The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A345113 a(n) is the palindrome reached after A345112(n) steps under repeated applications of the map x -> A345111(x), starting with n, or 0 if no palindrome is ever reached. 5
2, 4, 6, 8, 11, 33, 55, 77, 99, 11, 22, 33, 44, 55, 66, 77, 88, 99, 323, 22, 33, 44, 55, 66, 77, 88, 99, 323, 121, 33, 44, 55, 66, 77, 88, 99, 323, 121, 683737386, 44, 55, 66, 77, 88, 99, 323, 121, 683737386 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
First differs from A061563 at n = 19.
LINKS
EXAMPLE
For n = 19: 19 + 91 = 110, 110 + 101 = 211, 211 + 112 = 323 and 323 is a palindrome, so a(19) = 323.
PROG
(PARI) eva(n) = subst(Pol(n), x, 10)
rot(vec) = if(#vec < 2, return(vec)); my(s=concat(Str(2), ".."), v=[]); s=concat(s, Str(#vec)); v=vecextract(vec, s); v=concat(v, vec[1]); v
a(n) = my(x=n); while(1, x=x+eva(rot(digits(x))); if(digits(x)==Vecrev(digits(x)), return(x)))
(Python)
def pal(s): return s == s[::-1]
def rotl(s): return s[1:] + s[0]
def A345111(n): return n + int(rotl(str(n)))
def a(n):
i, iter, seen = 0, n, set()
while not (iter > n and pal(str(iter))) and iter not in seen:
seen.add(iter)
i, iter = i+1, A345111(iter)
return iter if iter > n and pal(str(iter)) else 0
print([a(n) for n in range(1, 49)]) # Michael S. Branicky, Jun 09 2021
CROSSREFS
Sequence in context: A068062 A088169 A061563 * A099994 A068065 A278228
KEYWORD
nonn,base,more
AUTHOR
Felix Fröhlich, Jun 09 2021
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 June 8 21:00 EDT 2024. Contains 373227 sequences. (Running on oeis4.)