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.

A329377 Number of iterations done when n is divided by its divisors starting from the smallest one in increasing order until one no longer gets an integer, or until divisors are exhausted.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 17 2019

Keywords

Examples

			For n = 12, its divisors are [1, 2, 3, 4, 6, 12]. We can divide only three times so that the quotient remains an integer: 12/1 = 12, 12/2 = 6, 6/3 = 2 (but 2/4 = 1/2, a fraction). Thus a(12) = 3.
For n = 24, its divisors are [1, 2, 3, 4, 6, 8, 12, 24]. We can divide only four times so that the quotient remains an integer: 24/1 = 24, 24/2 = 12, 12/3 = 4, 4/4 = 1, but on the fifth time 1/6 would be a rational, thus a(24) = 4.
		

Crossrefs

Cf. A000142, A076933 (final integer reached), A240694.

Programs

  • PARI
    A329377(n) = { my(k=n,i=0); fordiv(k, d, if(n%d, return(i)); n /= d; i++); (i); };

Formula

a(A000142(n)) = n.