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.

A176762 Smallest number that takes n steps to reach a cycle under iteration of sum-of-squares-of-digits map.

Original entry on oeis.org

1, 10, 13, 23, 19, 7, 356, 4, 2, 11, 15, 5, 3, 14, 45, 36, 6, 112, 269, 15999
Offset: 0

Views

Author

Robert G. Wilson v, Apr 25 2010

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ (IntegerDigits[n]^2); t = Table[0, {25}]; k = 1; While[k < 150000001, a = Length@ NestWhileList[f, k, UnsameQ@## &, All] - 1; If[a < 25 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]

Formula

a(n) = minimum of either A001273(n) or A094406(n+3).