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.

A373092 The number of iterations of the map x -> A093653(x) that are required to reach from n to one of the fixed points, 1, 2, 3 or 6.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, May 23 2024

Keywords

Examples

			The iterations for the n = 1..7 are:
  n  a(n)  iterations
  -  ----  -----------
  1    0   1
  2    0   2
  3    0   3
  4    1   4 -> 3
  5    1   5 -> 3
  6    0   6
  7    2   7 -> 4 -> 3
		

Crossrefs

Cf. A086793 (decimal analog), A093653, A373093, A373094.

Programs

  • Mathematica
    d[n_] := DivisorSum[n, Plus @@ IntegerDigits[#, 2] &]; a[n_] := -2 + Length@ FixedPointList[d, n]; Array[a, 100]
  • PARI
    a(n) = {my(c = 0); while(6 % n, n = sumdiv(n, d, hammingweight(d)); c++); c;}