login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002113 Palindromes in base 10.
(Formerly M0484 N0178)
251
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 444, 454, 464, 474, 484, 494, 505, 515 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

n is a palindrome (i.e. a(k)=n for some k) iff n = A004086(n). - Reinhard Zumkeller, Mar 10 2002

The g.f. -z*(1+10*z**9+10*z**10+81*z**11+9*z)/(8*z**10-9*z**9-9*z-1)/(z-1)**2 conjectured by Simon Plouffe in his 1992 dissertation is wrong. - N. J. A. Sloane, May 12 2008

A178788(a(n)) = 0 for n > 9. [From Reinhard Zumkeller, Jun 30 2010]

REFERENCES

Karl G. Grueber: "Palindrome, Perioden und Chaoten: 66 Streifzuege durch die palindromischen Gefilde" (1997, Deutsch-Taschenbuecher; Bd. 99) ISBN 3-8171-1522-9.

Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 71.

N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

T. D. Noe, List of first 19999 palindromes: Table of n, a(n) for n = 1..19999

Patrick De Geest, World of Numbers

_Simon Plouffe_, Approximations de S\'{e}ries G\'{e}n\'{e}ratrices et Quelques Conjectures, Dissertation, Universit\'{e} du Qu\'{e}bec \`{a} Montr\'{e}al, 1992.

_Simon Plouffe_, 1031 Generating Functions and Conjectures, Universit\'{e} du Qu\'{e}bec \`{a} Montr\'{e}al, 1992.

E. A. Schmidt, Positive Integer Palindromes

Eric Weisstein's World of Mathematics, Palindromic Number

Index entries for sequences related to palindromes

FORMULA

A136522(a(n)) = 1.

MAPLE

read transforms; t0:=[]; for n from 0 to 2000 do if digrev(n) = n then t0:=[op(t0), n]; fi; od: t0;

MATHEMATICA

palQ[n_Integer, base_Integer] := Module[{idn=IntegerDigits[n, base]}, idn==Reverse[idn]]; then to generate any base-b sequence: Select[Range[0, 1000], palQ[ #, b]&]

lst = {0}; r = 2; Do[Do[AppendTo[lst, n*10^(IntegerLength[n] - 1) + FromDigits@Rest@Reverse@IntegerDigits[n]], {n, 10^(e - 1), 10^e - 1}]; Do[AppendTo[lst, n*10^IntegerLength[n] + FromDigits@Reverse@IntegerDigits[n]], {n, 10^(e - 1), 10^e - 1}], {e, r}]; lst (* Arkadiusz Wesolowski, May 04 2012 *)

PROG

(PARI) is_A002113(n) = vecextract(n=Vec(Vecsmall(Str(n))), "-1..1")==n [From M. F. Hasler, Nov 17 2008]

(PARI) is(n)=n=digits(n); for(i=1, #n\2, if(n[i]!=n[#n+1-i], return(0))); 1 \\ Charles R Greathouse IV, Jan 04 2013

(Python)# A002113.py (replace leading dots with blanks)

mlist=[]

ctr=0

n=0

nmax=input("Enter max n ")

while n<=nmax:

...mstr=str(n)

...if mstr==mstr[::-1]:

......mlist.append(mstr)

......ctr+=1

...n+=1

print(mlist)

print("")

print(ctr)

(Haskell)

a002113 n = a002113_list !! (n-1)

a002113_list = filter ((== 1) . a136522) [1..]

-- Reinhard Zumkeller, Oct 09 2011

(Haskell)

a002113_list = m a056524_list a056525_list where

   m xs'@(x:xs) ys'@(y:ys) | x < y     = x : m xs ys'

                           | otherwise = y : m xs' ys

-- Reinhard Zumkeller, Dec 28 2011

CROSSREFS

Palindromes in bases 2 through 10: A006995, A014190, A014192, A029952, A029953, A029954, A029803, A029955, A002113.

Cf. A057148, A118594, A118595, A118596, A118597, A118598, A118599, A118600.

Subsequence of A061917.

Cf. A029742 (complement).

Union of A056524 and A056525.

Sequence in context: A043713 A110751 A147882 * A084982 A110785 A193413

Adjacent sequences:  A002110 A002111 A002112 * A002114 A002115 A002116

KEYWORD

nonn,base,easy,nice,core

AUTHOR

N. J. A. Sloane.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 21 02:08 EDT 2013. Contains 225472 sequences.