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!)
A015994 Smallest k such that the smallest palindrome > k in the Reverse and Add! trajectory of k is reached after exactly n iterations. 2
1, 5, 59, 69, 166, 79, 188, 193, 1397, 829, 167, 2069, 1797, 849, 177, 999, 739, 1798, 989, 6999, 1297, 869, 187, 89, 10797, 10853, 10921, 10971, 13297, 10548, 13293, 17793, 20889, 700269, 106977, 108933, 80359, 13697, 10794, 15891, 1009227, 1007619, 1009246 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Variant of A023109 allowing k to be palindromic itself.
Smallest k such that A033665(k) = n.
LINKS
PROG
(PARI) iterationstosmallestpalindrome(n, bound) = my(x=n, i=0, d); while(1, if(i > bound, return(-1)); x=x+eval(concat(Vecrev(Str(x)))); i++; d=digits(x); if(d==Vecrev(d), return(i)))
a(n) = for(k=1, oo, if(iterationstosmallestpalindrome(k, n)==n, return(k))) \\ Felix Fröhlich, May 28 2022
CROSSREFS
Cf. A023109.
Sequence in context: A267722 A096476 A158694 * A222563 A141951 A243701
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, May 28 2022; original entry N. J. A. Sloane, Dec 11 1999
EXTENSIONS
Keyword "dead" removed, more terms added and entry revised by Felix Fröhlich, May 28 2022; Jun 22 2022
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 06:45 EDT 2024. Contains 371906 sequences. (Running on oeis4.)