OFFSET
2,1
LINKS
Colin Barker, Table of n, a(n) for n = 2..1000
G. J. Simmons, Palindromic powers, J. Rec. Math., 3 (No. 2, 1970), 93-98. [Annotated scanned copy]
Index entries for linear recurrences with constant coefficients, signature (1,4,-4,-6,6,4,-4,-1,1).
FORMULA
From Colin Barker, Oct 26 2015: (Start)
a(n) = (2*n*(3*n^3-14*n^2+147*n+272)+(4*n^3-30*n^2+128*n-27)*(-1)^n-741)/768.
G.f.: x^2*(x^7-4*x^5-4*x^4+4*x^3+4*x^2-2*x-2) / ((x-1)^5*(x+1)^4).
(End)
MATHEMATICA
LinearRecurrence[{1, 4, -4, -6, 6, 4, -4, -1, 1}, {2, 4, 8, 12, 20, 28, 44, 59, 89}, 50] (* Harvey P. Dale, Feb 07 2024 *)
PROG
(PARI) a(n) = (2*n*(3*n^3-14*n^2+147*n+272)+(4*n^3-30*n^2+128*n-27)*(-1)^n-741)/768 \\ Colin Barker, Oct 26 2015
(PARI) Vec(x^2*(x^7-4*x^5-4*x^4+4*x^3+4*x^2-2*x-2)/((x-1)^5*(x+1)^4) + O(x^100)) \\ Colin Barker, Oct 26 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Oct 23 2015
STATUS
approved