|
|
A323077
|
|
Number of iterations of map x -> (x - (largest divisor d < x)) needed to reach 1 or a prime, when starting at x = n.
|
|
8
|
|
|
0, 0, 0, 1, 0, 1, 0, 2, 2, 1, 0, 2, 0, 1, 2, 3, 0, 3, 0, 2, 2, 1, 0, 3, 3, 1, 4, 2, 0, 3, 0, 4, 2, 1, 3, 4, 0, 1, 2, 3, 0, 3, 0, 2, 4, 1, 0, 4, 4, 4, 2, 2, 0, 5, 3, 3, 2, 1, 0, 4, 0, 1, 4, 5, 3, 3, 0, 2, 2, 4, 0, 5, 0, 1, 5, 2, 4, 3, 0, 4, 6, 1, 0, 4, 3, 1, 2, 3, 0, 5, 4, 2, 2, 1, 3, 5, 0, 5, 4, 5, 0, 3, 0, 3, 5
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,8
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
If A001222(n) <= 1 [when n is 1 or a prime], a(n) = 0, otherwise a(n) = 1 + a(A060681(n)).
|
|
MATHEMATICA
|
Nest[Append[#1, If[PrimeOmega[#2] <= 1, 0, 1 + #1[[Max@ Differences@ Divisors[#2] ]] ]] & @@ {#, Length@ # + 1} &, {}, 105] (* Michael De Vlieger, May 26 2020 *)
|
|
PROG
|
(PARI)
A060681(n) = (n-if(1==n, n, n/vecmin(factor(n)[, 1])));
|
|
CROSSREFS
|
Cf. A334198 (positions of the records, also the first occurrence of each n).
Differs from A334201 for the first time at n=169, where a(169) = 5, while A334201(169) = 6.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|