The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A295319 a(n) is the sum of all n-digit palindromes. 0
 45, 495, 49500, 495000, 49500000, 495000000, 49500000000, 495000000000, 49500000000000, 495000000000000, 49500000000000000, 495000000000000000, 49500000000000000000, 495000000000000000000, 49500000000000000000000, 495000000000000000000000 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS For n > 1, the sum of the digits of a(n) is always 18 (see AoPS link). LINKS FORMULA a(n) = A050683(n)*(5*10^(n-1) + (9/2)*10^(n-2) + ... + (9/2)*10 + 5) (calculates the sum by multiplying the expected value of a randomly selected n-digit palindrome with the number of n-digit palindromes). For n > 1, a(n) = (A050683(n)/2)*11*10^(n-1). For n > 3, a(n) = 1000 * a(n - 2). - David A. Corneth, Dec 26 2017 G.f.: x*(45 + 495*x + 4500*x^2)/(1 - 1000*x^2). - Chai Wah Wu, Jan 22 2018 EXAMPLE The sum of all nine two-digit palindromes is 11 + 22 + 33 + 44 + 55 + 66 + 77 + 88 + 99 = 495, and so a(2) = 495. The sum of all three-digit palindromes is (101 + 999) + (111 + 989) + (121 + 979) + ... (545 + 565) + 555 = 49500, and so a(3) = 49500. MATHEMATICA palSum[n_] := 99/2*10^(n - 1) * 10^Floor[(n - 1)/2]; palSum[1] = 45; Array[ palSum, 16] (* Robert G. Wilson v, Nov 21 2017 *) PROG (PARI) a(n) = if (n==1, 45, 9*10^floor((n-1)/2)*11*10^(n-1)/2); \\ Michel Marcus, Dec 26 2017 CROSSREFS Cf. A002113, A050683, A261675. Sequence in context: A053137 A193434 A086576 * A147808 A190417 A093529 Adjacent sequences:  A295316 A295317 A295318 * A295320 A295321 A295322 KEYWORD base,nonn AUTHOR Melvin Peralta, Nov 19 2017 STATUS approved

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

Last modified June 15 11:44 EDT 2021. Contains 345048 sequences. (Running on oeis4.)