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.

A063050 a(n) = number of 'Reverse and Add!' operations that have to be applied to the n-th term of A063049 in order to obtain a term in the trajectory of 196.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1
Offset: 0

Views

Author

Klaus Brockhaus, Jul 07 2001

Keywords

Examples

			394 is a term of A063049. One 'Reverse and Add!' operation applied to 394 leads to a term (887) in the trajectory of 196, so the corresponding term of the present sequence is 1.
		

Crossrefs

Programs

  • Mathematica
    limit = 10^3; x = NestList[ # + IntegerReverse[#] &, 196, limit];
    y = Select[Range[197, 4942],
       Intersection[NestList[ # + IntegerReverse[#] &, #, limit],
          x] != {} &];
    Table[
     Length@NestWhileList[# + IntegerReverse[#] &,
        y[[i]], ! MemberQ[x, #] &] - 1, {i, Length[y]}]
    (* Robert Price, Oct 21 2019 *)