OFFSET
0,3
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
a(2n+1) = (n+1)^3; a(2n) = (2n+1)*T(n) = (2n+1)*(n+1)*n/2, where T=A000217. - R. J. Mathar, Feb 11 2008
a(n) = A034828(n+1). - R. J. Mathar, Aug 18 2008
G.f.: x*(1+x+x^2)/(1-2*x-x^2+4*x^3-x^4-2*x^5+x^6). - Colin Barker, Jan 04 2012
a(n) = (2*n^3+6*n^2+5*n+1-(n+1)*(-1)^n)/16. - Luce ETIENNE, May 12 2015
a(n) = Sum_{k=0..n} A001318(k). - Jacob Szlachetka, Dec 20 2021
Sum_{n>=1} 1/a(n) = 6 - 8*log(2) + zeta(3). - Amiram Eldar, Sep 17 2022
EXAMPLE
The (n,r)-th term of the following triangle is T(n)-T(r) for r = 0 to n. The n-th row contains n+1 terms.
0
1 0
3 2 0
6 5 3 0
10 9 7 4 0
15 14 12 9 5 0
21 20 18 15 11 6 0
28 27 ...
36 ...
Sequence contains the sum of terms at a 45-degree angle.
a(5) = 15 + 9 + 3 = 27.
MAPLE
A109900 := proc(n) if n mod 2 = 1 then ( (n+1)/2)^3 ; else (n+1)*(n/2+1)*(n/2)/2 ; fi ; end: seq(A109900(n), n=0..80) ; # R. J. Mathar, Feb 11 2008
MATHEMATICA
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 1, 3, 8, 15, 27}, 50] (* Amiram Eldar, Sep 17 2022 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Jul 13 2005
EXTENSIONS
Corrected and extended by R. J. Mathar, Feb 11 2008
STATUS
approved