login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A050686
Number of palindromes of length n and containing the digit 1 (or any other fixed nonzero digit).
2
1, 1, 18, 18, 252, 252, 3168, 3168, 37512, 37512, 427608, 427608, 4748472, 4748472, 51736248, 51736248, 555626232, 555626232, 5900636088, 5900636088, 62105724792, 62105724792, 648951523128, 648951523128, 6740563708152
OFFSET
1,3
FORMULA
Empirical g.f.: -x*(x-1)*(x+1)^2 / ((3*x-1)*(3*x+1)*(10*x^2-1)). - Colin Barker, Feb 15 2013
From Sela Fried, Dec 10 2024: (Start)
The conjectured g.f is correct.
a(n) = 9*10^(n/2 - 1) - 8*9^(n/2 - 1) if n is even
a(n) = 9*10^((n - 1)/2) - 8*9^((n - 1)/2) if n is odd. (End)
EXAMPLE
For length 3 we find 18 numbers: 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 212, 313, 414, 515, 616, 717, 818, 919.
CROSSREFS
Sequence in context: A298378 A299245 A352365 * A165839 A372457 A177014
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Aug 15 1999
EXTENSIONS
More terms from Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999
STATUS
approved