A015994 Smallest k such that the smallest palindrome > k in the Reverse and Add! trajectory of k is reached after exactly n iterations.
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
Offset: 1
Links
- Fabien Gelineau, Table of n, a(n) for n = 1..82
Crossrefs
Cf. A023109.
Programs
-
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
Extensions
Keyword "dead" removed, more terms added and entry revised by Felix Fröhlich, May 28 2022; Jun 22 2022
Comments