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!)
 A033865 Start with n; if palindrome, stop; otherwise add to itself with digits reversed; a(n) gives palindrome at which it stops, or -1 if no palindrome is ever reached. 43
 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 33, 44, 55, 66, 77, 88, 99, 121, 22, 33, 22, 55, 66, 77, 88, 99, 121, 121, 33, 44, 55, 33, 77, 88, 99, 121, 121, 363, 44, 55, 66, 77, 44, 99, 121, 121, 363, 484, 55, 66, 77, 88, 99, 55, 121, 363, 484, 1111, 66, 77, 88, 99, 121, 121, 66, 484, 1111, 4884, 77, 88, 99, 121, 121, 363, 484, 77, 4884, 44044, 88 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS It is believed that a(196) = -1. REFERENCES M. Donner, I Love Me, Vol. I: S. Wordrow's palindromic encyclopedia (Algonquin Books, 1996) p. 268 LINKS T. D. Noe, Table of n, a(n) for n = 0..195 O. Forster, ARIBAS Mathforum, Making Numbers into Palindromic Numbers Eric Weisstein's World of Mathematics, 196-Algorithm. EXAMPLE 19 -> 19 + 91 = 110 -> 110 + 011 = 121, so a(19) = 121. MATHEMATICA Table[NestWhile[# + FromDigits[Reverse[IntegerDigits[#]]] &, n, IntegerDigits[#] != Reverse[IntegerDigits[#]] &], {n, 0, 90}] (* Harvey P. Dale, Dec 18 2011 *) PROG (ARIBAS): var st: stack; end; for k := 0 to 60 do n := k; while n <> int_reverse(n) do n := n + int_reverse(n); end; stack_push(st, n); end; stack2array(st). (PARI) a(n)=my(k); while((k=fromdigits(Vecrev(digits(n)))) != n, n += k); n \\ infinite loop if a(n) = -1; Charles R Greathouse IV, Dec 13 2015 CROSSREFS Cf. A061563, A016016, A023109, A006960, A023108, A002113, A033665 (number of steps). Sequence in context: A082273 A256755 A045876 * A118764 A226134 A057717 Adjacent sequences:  A033862 A033863 A033864 * A033866 A033867 A033868 KEYWORD nonn,base,nice AUTHOR EXTENSIONS More terms from Jenise Smalley (neicey01(AT)hotmail.com), Oct 18 2001 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 May 29 02:05 EDT 2020. Contains 334690 sequences. (Running on oeis4.)