OFFSET
0,5
REFERENCES
G. Pólya and G. Szegő, Problems and Theorems in Analysis I, Springer-Verlag, Part I, Chap. 1, Problem 31.
LINKS
William A. Tedeschi, Table of n, a(n) for n = 0..10000
G. E. Andrews, P. Paule and A. Riese, MacMahon's partition analysis III. The Omega package, p. 16.
G. E. Andrews, P. Paule and A. Riese, MacMahon's Partition Analysis: The Omega Package, Europ. J. Combin., 22 (2001), 887-904.
FORMULA
G.f.: x^3*(1 + 2*x - 2*x^2)/(1 - x)/(1 - x^2)^2.
a(n) = (n+8)*(n-2)/8 for n even, (n^2-1)/8 for n odd.
a(n) = (2*n^2 + 6*n - 17 + 3*(2*n - 5)*(-1)^n)/16 for n>0. - Luce ETIENNE, Jun 29 2015
E.g.f.: (16 + (x^2 + x - 16)*cosh(x) + (x^2 + 7*x - 1)*sinh(x))/8. - Stefano Spezia, May 09 2022
MATHEMATICA
f[n_]:=If[EvenQ[n], ((n+8)(n-2))/8, (n^2-1)/8]; Join[{0}, Array[f, 60]] (* Harvey P. Dale, Jul 26 2011 *)
PROG
(PARI) for(n=0, 60, print1(if(n==0, 0, (2*n^2 + 6*n - 17 + 3*(2*n - 5)*(-1)^n)/16), ", ")) \\ G. C. Greubel, Jun 10 2018
(Magma) [0] cat [(2*n^2 + 6*n - 17 + 3*(2*n - 5)*(-1)^n)/16: n in [1..60]]; // G. C. Greubel, Jun 10 2018
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
N. J. A. Sloane, May 06 2002
STATUS
approved