|
|
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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Keyword "dead" removed, more terms added and entry revised by Felix Fröhlich, May 28 2022; Jun 22 2022
|
|
STATUS
|
approved
|
|
|
|