A065001 a(n) = (presumed) number of palindromes in the 'Reverse and Add!' trajectory of n, or -1 if this number is not finite.
11, 10, 8, 9, 10, 7, 6, 8, 4, 9, 9, 6, 7, 5, 5, 7, 6, 3, 4, 8, 6, 8, 5, 5, 7, 6, 3, 4, 4, 6, 7, 5, 6, 7, 6, 3, 4, 4, 4, 7, 5, 5, 7, 7, 3, 4, 4, 4, 2, 5, 5, 7, 6, 3, 5, 4, 4, 2, 6, 5, 7, 6, 3, 4, 4, 5, 2, 6, 3, 7, 6, 3, 4, 4, 4, 2, 7, 3, 5, 6, 3, 4, 4, 4, 2, 6, 3, 6, 1, 3, 4, 4, 4, 2, 6, 3, 5, 1, 3, 8, 8, 6, 6
Offset: 1
Examples
8, 77, 1111, 2222, 4444, 8888, 661166, 3654563 are the eight palindromes in the trajectory of 8 and 3654563 + 3654563 = 7309126 is the sixth term in the trajectory of 10577 (see A063433) which (presumably) never leads to a palindrome (see A063048), so a(8) = 8.
Programs
-
ARIBAS
maxarg := 120; stop := 500; for k := 1 to maxarg do n := k; count := 0; c := 0; while c < stop do if n = int_reverse(n) then inc(count); c := 0; end; inc(c); n := n + int_reverse(n); end; write(count," " ); end;
Comments