|
|
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.
|
|
5
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
Differs from A064918 at n = 25, 48, 51, 69, 75, 81, 85, 94, 95, 99, 100, 111, 115, 121, ...
|
|
LINKS
|
|
|
FORMULA
|
If n == (1+A060681(n)), then a(n) = 0, otherwise a(n) = 1 + a(1+A060681(n)).
|
|
MATHEMATICA
|
{0}~Join~Array[-2 + Length@ NestWhileList[1 + (# - Divisors[#][[-2]]) &, #, UnsameQ, All] &, 104, 2] (* Michael De Vlieger, Jan 04 2019 *)
|
|
PROG
|
(PARI)
A060681(n) = (n-if(1==n, n, n/vecmin(factor(n)[, 1])));
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|