OFFSET
0,3
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (7,-20,30,-25,11,-2).
FORMULA
a(n) = Sum_{k=0..2} C(n, 2*k) + 2*Sum_{k=3..floor(n/2)} C(n, 2*k).
a(n) = (n^4 - 6*n^3 + 23*n^2 - 18*n + 24)/24 + 2*Sum_{k=3..floor(n/2)} C(n, 2*k).
O.g.f.: (1-2*x+2*x^2)*(1-4*x+5*x^2-2*x^3+x^4)/((1-x)^5*(1-2*x)). - R. J. Mathar, Apr 07 2008
a(n) = A000225(n) - (1/24)*n*(n-1)*(n^2 - 5*n + 18) + [n=0]. - G. C. Greubel, Mar 19 2023
MATHEMATICA
Table[Boole[n==0] +(2^n-1) -(1/24)*n*(n^3-6*n^2+23*n-18), {n, 0, 50}] (* G. C. Greubel, Mar 19 2023 *)
PROG
(Magma) [(2^n-1) -(1/24)*n*(n^3-6*n^2+23*n-18) +0^n: n in [0..50]]; // G. C. Greubel, Mar 19 2023
(SageMath) [(2^n-1) -(1/24)*n*(n^3-6*n^2+23*n-18) +0^n for n in range(51)] # G. C. Greubel, Mar 19 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jun 06 2003
STATUS
approved