login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A342718
a(1) = 0; for n >= 2, a(n) is the number of iterations needed for the map x -> A000203(x)/A000005(x) to reach a number that is not an integer, when starting from x = n.
1
0, 1, 2, 1, 3, 3, 2, 1, 1, 1, 4, 1, 3, 4, 4, 1, 2, 1, 2, 3, 2, 2, 2, 1, 1, 1, 2, 1, 5, 2, 2, 1, 2, 1, 2, 1, 3, 5, 5, 1, 3, 2, 3, 5, 4, 2, 2, 1, 3, 1, 2, 1, 3, 5, 2, 5, 4, 1, 3, 5, 3, 2, 1, 1, 3, 2, 2, 3, 2, 2, 2, 1, 4, 1, 1, 1, 2, 3, 2, 1, 1, 1
OFFSET
1,3
COMMENTS
a(n) = 1 for n >= 2, n from A049642.
EXAMPLE
n = 3; 3 -> s(3)/d(3) = 2 -> s(2)/d(2) = 3/2, a(3) = 2;
n = 11; 11 -> s(11)/d(11) = 6 -> s(6)/d(6) = 3 -> s(3)/d(3) = 2 -> s(2)/d(2) = 3/2, a(11) = 4;
n = 20; 20 -> s(20)/d(20) = 7 -> s(7)/d(7) = 4 -> s(4)/d(4) = 7/3, a(20) = 3;
s(x) = A000203(x), d(x) = A000005(x).
MATHEMATICA
f[n_] := Divide @@ DivisorSigma[{1, 0}, n]; a[n_] := Length @ NestWhileList[f, n, IntegerQ[#] && # > 1 &] - 1; Array[a, 100] (* Amiram Eldar, Mar 19 2021 *)
PROG
(PARI) a(n) = if (n==1, 0, my(nb=1, k); while(denominator(k=sigma(n)/numdiv(n)) == 1, n = k; nb++); nb); \\ Michel Marcus, Mar 21 2021
CROSSREFS
Cf. A019294 for a similar iteration.
Sequence in context: A088074 A071463 A335191 * A355686 A308530 A302555
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Mar 19 2021
STATUS
approved