A015979 Three iterations of Reverse and Add are needed to reach a palindrome.
59, 68, 77, 86, 95, 155, 156, 157, 158, 164, 165, 168, 178, 180, 184, 185, 186, 194, 199, 249, 254, 255, 256, 257, 263, 264, 267, 277, 283, 284, 285, 293, 298, 299, 348, 349, 353, 354, 355, 356, 362, 363, 366, 376, 382, 383, 384, 389, 392, 397
Offset: 1
Links
Programs
-
Maple
filter:= proc(n,t) local x, d, m, L, i; x:= n; L:= convert(x,base,10); for i from 1 to t do d:= nops(L); x:= add(L[i]*(10^(i-1) + 10^(d-i)),i=1..d); L:= convert(x,base,10); if L = ListTools:-Reverse(L) then return (i=t) fi; od; false end proc: select(filter, [$1..1000], 3); # Robert Israel, Aug 26 2024
Extensions
Offset corrected by Robert Israel, Aug 26 2024
Comments