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.

A323076 Number of iterations of map x -> 1+(x-(largest divisor d < x)), starting from x=n, needed to reach a fixed point, which is always either a prime or 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

Differs from A064918 at n = 25, 48, 51, 69, 75, 81, 85, 94, 95, 99, 100, 111, 115, 121, ...

Crossrefs

Cf. A060681, A064918, A323075 (the fixed points reached), A323077, A323079.
Cf. also A039651.

Programs

  • Mathematica
    {0}~Join~Array[-2 + Length@ NestWhileList[1 + (# - Divisors[#][[-2]]) &, #, UnsameQ, All] &, 104, 2] (* Michael De Vlieger, Jan 04 2019 *)
  • PARI
    A060681(n) = (n-if(1==n,n,n/vecmin(factor(n)[,1])));
    A323076(n) = { my(nn = 1+A060681(n)); if(nn==n,0,1+A323076(nn)); };

Formula

If n == (1+A060681(n)), then a(n) = 0, otherwise a(n) = 1 + a(1+A060681(n)).