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.

A355300 a(0) = 0; for n >= 1, a(n) = a(A007088(n) mod n) + 1.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 2, 3, 2, 2, 1, 3, 2, 4, 1, 1, 3, 3, 2, 2, 3, 4, 3, 4, 2, 4, 1, 3, 2, 2, 2, 2, 3, 3, 1, 3, 1, 2, 2, 5, 2, 3, 2, 6, 2, 2, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 3, 2, 1, 4, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 4, 1, 3, 2, 4, 1, 3, 2, 4, 3, 3, 2, 2, 2
Offset: 0

Views

Author

Ctibor O. Zizka, Jun 27 2022

Keywords

Comments

Number of steps needed to reach zero when starting from k = n and repeatedly applying the map that replaces k by A007088(k) mod k. For a(n) = 1 see A032533.
a(95980631) = 26. - Charles R Greathouse IV, Jun 30 2022

Examples

			n = 12, a(12) = a(1100 mod 12) + 1 = a(8) + 1 = a(1000 mod 8) + 2 = a(0) + 2 = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = a[Mod[FromDigits[IntegerDigits[n, 2]], n]] + 1; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jun 27 2022 *)
  • PARI
    f(n) = fromdigits(binary(n), 10); \\ A007088
    a(n) = if (n, a(f(n) % n)+1, 0); \\ Michel Marcus, Jun 27 2022