cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A070742 a(n) = index of the (presumably) last palindrome in the 'Reverse and Add' trajectory of n, or -1 if this number is not finite, or 0 if no palindrome exists.

Original entry on oeis.org

18, 17, 32, 16, 36, 31, 30, 15, 23, 35, 34, 30, 33, 29, 29, 14, 32, 22, 28, 34, 30, 33, 29, 29, 14, 32, 22, 28, 27, 30, 33, 29, 29, 14, 32, 22, 28, 27, 28, 33, 29, 29, 14, 32, 22, 28, 27, 28, 26, 29, 29, 14, 32, 22, 28, 27, 28, 26, 13, 29, 14, 32, 22, 28, 27, 28, 26, 13, 27
Offset: 1

Views

Author

Klaus Brockhaus, May 03 2002

Keywords

Comments

The computation of a trajectory was stopped, when within 1000 steps no further palindrome appeared. - A033665(n) + 1 is the index of the first palindrome in the 'Reverse and Add' trajectory of n.
Terms correct for at least 10000 steps after last palindrome. - Sean A. Irvine, Jun 11 2024

Examples

			6, 33, 66, 363, 4884, 8836886388, 47337877873374 are the seven palindromes in the trajectory of 6 and the next 1000 steps do not lead to another palindrome; 47337877873374 is the 31st term in the trajectory, so a(6) = 31.
		

Crossrefs

Programs

  • ARIBAS
    var st,nst: string; end; for k := 1 to 74 do n := k; j := 1; x := 0; c := 0; while c < 1000 do st := itoa(n); nst := ""; for i := 0 to length(st) - 1 do nst := concat(st[i],nst); end; rev := atoi(nst); if n = rev then c := 0; x := j; end; inc(c); n := n + rev; inc(j); end; write(x,"," ); end;

A070743 n sets a new record for the index of the (presumably) last palindrome in the 'Reverse and Add' trajectory of n.

Original entry on oeis.org

1, 3, 5, 122, 160, 190, 739, 10000, 10058, 10151, 1003346, 1304392, 1702190
Offset: 1

Views

Author

Klaus Brockhaus, May 03 2002

Keywords

Comments

A070744 gives the corresponding records.

Examples

			678736545637876 is the 36th term and (presumably) the last palindrome in the trajectory of 5; for k < 5 the last palindrome has an index < 36 in the trajectory of k (cf. A070742), so 5 is in the sequence.
		

Crossrefs

Extensions

Offset corrected by Sean A. Irvine, Jun 11 2024
Showing 1-2 of 2 results.