|
|
A050684
|
|
Number of nonzero palindromes < 10^n and containing at least one digit '1'.
|
|
2
|
|
|
1, 2, 20, 38, 290, 542, 3710, 6878, 44390, 81902, 509510, 937118, 5685590, 10434062, 62170310, 113906558, 669532790, 1225159022, 7125795110, 13026431198, 75132155990, 137237880782, 786189403910, 1435140927038
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(2n) = 2*(10^n - 9^n); a(2n + 1) = 2*(10^n - 9^n) + 9*10^n - 8*9^n. - David Wasserman, Feb 14 2002
|
|
EXAMPLE
|
Up to 10^2 we find two numbers 1 and 11.
|
|
MATHEMATICA
|
Table[If[EvenQ[n], 2*(10^(n/2) - 9^(n/2)) , 2*(10^((n - 1)/2) - 9^((n - 1)/2)) + 9*10^((n - 1)/2) - 8*9^((n - 1)/2)], {n, 25}] (* or *) LinearRecurrence[{0, 19, 0, -90}, {1, 2, 20, 38}, 25] (* G. C. Greubel, Oct 27 2016 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|