OFFSET
0,2
COMMENTS
Number of odd palindromes <= 10^n.
LINKS
Eric Weisstein's World of Mathematics, Palindromic Number
Index entries for linear recurrences with constant coefficients, signature (1,10,-10).
FORMULA
G.f.: (1 + 4*x - 5*x^2 + 10*x^3) / ((1 - x) * (1 - 10*x^2)).
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3). - Wesley Ivan Hurt, Aug 25 2022
MATHEMATICA
nmax = 28; CoefficientList[Series[(1 + 4 x - 5 x^2 + 10 x^3) / ((1 - x) (1 - 10 x^2)), {x, 0, nmax}], x]
Join[{1}, LinearRecurrence[{1, 10, -10}, {5, 10, 60}, 28]]
PROG
(PARI) Vec((1 + 4*x - 5*x^2 + 10*x^3) / ((1 - x) * (1 - 10*x^2)) + O(x^30)) \\ Michel Marcus, Oct 13 2019
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Ilya Gutkovskiy, Oct 12 2019
STATUS
approved