login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A240022 Total number of digits in palindromes with n digits. 0
10, 18, 270, 360, 4500, 5400, 63000, 72000, 810000, 900000, 9900000, 10800000, 117000000, 126000000, 1350000000, 1440000000, 15300000000, 16200000000, 171000000000, 180000000000, 1890000000000, 1980000000000, 20700000000000, 21600000000000 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Let f(1) = g(1) = 10 and f(2) = 1; d(n) denotes the number of digits in f(n) and for n >= 3, f(n) = 10*f(n-1) + 5*10^(d(n-1)-1) if n is odd, otherwise f(n) = f(n-1) + 10^(d(n-1)-1)/2. Let g(n) = 18*f(n) for n > 1. It gives g(2) = 18, g(3) = 270, g(4) = 360, g(5) = 4500, .... In fact g(n) produces a different sequence than a(n).
LINKS
FORMULA
a(n) = n*A070252(n).
a(n) = 20*a(n-2)-100*a(n-4) for n>5. G.f.: 2*x*(50*x^4+35*x^2+9*x+5) / (10*x^2-1)^2. - Colin Barker, Mar 31 2014
EXAMPLE
There are nine 2-digit palindromes, so a(2) = 2*9 = 18.
PROG
(PARI) print1("10, 18, "); m=9; for(n=3, 24, if(bitand(n, 1), m=10*m); print1(m*n, ", "));
(PARI) Vec(2*x*(50*x^4+35*x^2+9*x+5)/(10*x^2-1)^2 + O(x^100)) \\ Colin Barker, Mar 31 2014
CROSSREFS
Sequence in context: A358985 A171767 A153689 * A264386 A173822 A122607
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)