OFFSET
0,4
COMMENTS
For n >= 2, number of palindromic squares of length n whose decimal digits are 0 or 1 and with 9 or fewer 1's.
LINKS
Colin Barker, Table of n, a(n) for n = 0..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 (0,4,0,-6,0,4,0,-1).
FORMULA
From Colin Barker, Oct 26 2015: (Start)
a(n) = (-((-1)^n*(-78+62*n-12*n^2+n^3))+3*(-26+42*n-8*n^2+n^3))/96.
a(n) = 4*a(n-2)-6*a(n-4)+4*a(n-6)-a(n-8) for n>7.
G.f.: x^2*(2*x+1)*(2*x^4-2*x^2+1) / ((x-1)^4*(x+1)^4).
(End)
PROG
(PARI) a(n) = (-((-1)^n*(-78+62*n-12*n^2+n^3))+3*(-26+42*n-8*n^2+n^3))/96 \\ Colin Barker, Oct 26 2015
(PARI) concat(vector(2), Vec(x^2*(2*x+1)*(2*x^4-2*x^2+1)/((x-1)^4*(x+1)^4) + O(x^100))) \\ Colin Barker, Oct 26 2015
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Oct 23 2015
STATUS
approved