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!)
A050250 Number of nonzero palindromes less than 10^n. 15
9, 18, 108, 198, 1098, 1998, 10998, 19998, 109998, 199998, 1099998, 1999998, 10999998, 19999998, 109999998, 199999998, 1099999998, 1999999998, 10999999998, 19999999998, 109999999998, 199999999998, 1099999999998, 1999999999998, 10999999999998 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
G. J. Simmons, Palindromic powers, J. Rec. Math., 3 (No. 2, 1970), 93-98. [Annotated scanned copy]
Eric Weisstein's World of Mathematics, Palindromic Number.
FORMULA
a(2*k) = 2*10^k - 2, a(2*k + 1) = 11*10^k - 2. - Sascha Kurz, Apr 14 2002
From Jonathan Vos Post, Jun 18 2008: (Start)
a(n) = Sum_{i=1..n} A050683(i).
a(n) = Sum_{i=1..n} 9*10^floor((i-1)/2).
a(n) = 9*Sum_{i=1..n} 10^floor((i-1)/2). (End)
From Bruno Berselli, Feb 15 2011: (Start)
G.f.: 9*x*(1+x)/((1-x)*(1-10*x^2)).
a(n) = (1/2)*10^((2*n + (-1)^n - 1)/4)*(13 - 9*(-1)^n) - 2. (End)
a(1)=9, a(2)=18, a(3)=108; for n>3, a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3). - Harvey P. Dale, Jan 29 2012
a(n) = 10*a(n-2) + 18. - R. J. Mathar, Nov 07 2015
E.g.f.: 2*cosh(sqrt(10)*x) - 2*(cosh(x) + sinh(x)) + 11*sinh(sqrt(10)*x)/sqrt(10). - Stefano Spezia, Jun 11 2022
MAPLE
A050250List := proc(len); local s, egf, ser; s:= 11/(2*sqrt(10));
egf := -2*exp(x) + (1-s)*exp(-sqrt(10)*x) + (1+s)*exp(sqrt(10)*x);
ser := series(egf, x, len+2): seq(simplify(n!*coeff(ser, x, n)), n = 1..len) end:
A050250List(25); # Peter Luschny, Jun 11 2022 after Stefano Spezia
MATHEMATICA
LinearRecurrence[{1, 10, -10}, {9, 18, 108}, 30] (* Harvey P. Dale, Jan 29 2012 *)
CoefficientList[Series[2Cosh[Sqrt[10]x]-2(Cosh[x]+Sinh[x])+11Sinh[Sqrt[10]x]/Sqrt[10], {x, 0, 25}], x]Table[n!, {n, 0, 25}] (* Stefano Spezia, Jun 11 2022 *)
PROG
(PARI) a(n)=10^(n\2)*(13-9*(-1)^n)/2-2 \\ Charles R Greathouse IV, Jun 25 2017
(Python)
def a(n):
m = 10 ** (n >> 1)
if n & 1 == 0:
return (m - 1) << 1
else:
return (11 * m) - 2 # Darío Clavijo, Oct 16 2023
CROSSREFS
Sequence in context: A186443 A066711 A033651 * A080453 A222811 A002169
KEYWORD
nonn,easy,base,nice
AUTHOR
Eric W. Weisstein, Dec 11 1999
EXTENSIONS
More terms from Patrick De Geest, Dec 15 1999
a(24)-a(25) from Jonathan Vos Post, Jun 18 2008
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 May 3 21:49 EDT 2024. Contains 372225 sequences. (Running on oeis4.)