OFFSET
1,2
REFERENCES
Computed by Fred Hallden.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,2,-6,0,6,-2,-2,1).
FORMULA
a(2*n) = n/2*(2*n^3 + 3*n - 1); a(2*n+1) = n/2*(2*n^3 + 4*n^2 + 7*n + 3).
a(0)=0, a(1)=2, a(2)=8, a(3)=21, a(4)=49, a(5)=93, a(6)=171, a(7)=278, a(n)=2*a(n-1)+2*a(n-2)-6*a(n-3)+0*a(n-4)+6*a(n-5)-2*a(n-6)- 2*a(n-7)+ a(n-8). - Harvey P. Dale, May 06 2012
G.f.: -x^2*(x^5+x^4+3*x^3+x^2+4*x+2) / ((x-1)^5*(x+1)^3). - Colin Barker, Jul 11 2013
From James Stein, May 22 2014: (Start)
For odd n: a(n) = (n^4 + 8*n^2 - 8*n - 1)/16;
For even n: a(n) = n*(n^3 + 6*n - 4)/16. (End)
a(n) = A054252(n, 2), n >= 0. - Wolfdieter Lang, Oct 03 2016
E.g.f.: (x*(1 + 13*x + 6*x^2 + x^3)*cosh(x) + (-1 + 3*x + 15*x^2 + 6*x^3 + x^4)*sinh(x))/16. - Stefano Spezia, Apr 14 2022
a(n) = (2*n^4+14*n^2-12*n-1-(-1)^n*(2*n^2-4*n-1))/32. - Wesley Ivan Hurt, Dec 30 2023
MATHEMATICA
LinearRecurrence[{2, 2, -6, 0, 6, -2, -2, 1}, {0, 2, 8, 21, 49, 93, 171, 278}, 40]
CoefficientList[Series[- x (x^5 + x^4 + 3 x^3 + x^2 + 4 x + 2)/((x - 1)^5 (x + 1)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 15 2013 *)
PROG
(PARI) a(n)=if(n%2, n^4 + 8*n^2 - 8*n - 1, n^4 + 6*n^2 - 4*n)/16 \\ Charles R Greathouse IV, Feb 09 2017
(Magma) [(2*n^4+14*n^2-12*n-1-(-1)^n*(2*n^2-4*n-1))/32 : n in [1..60]]; // Wesley Ivan Hurt, Dec 30 2023
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
Borghard, William (bogey(AT)hostare.att.com)
EXTENSIONS
More terms and formula from Hugo van der Sanden
More terms from Colin Barker, Jul 11 2013
STATUS
approved