|
|
A323073
|
|
Number of iterations of A049820(x) = x - A000005(x) needed to reach either zero or such x that x and A049820(x) are coprime, when starting from x = n.
|
|
6
|
|
|
0, 0, 1, 0, 0, 0, 2, 0, 1, 3, 3, 0, 3, 0, 4, 0, 0, 0, 4, 0, 5, 0, 5, 0, 1, 0, 6, 0, 6, 0, 6, 0, 7, 0, 7, 0, 1, 0, 8, 0, 8, 0, 8, 0, 9, 1, 9, 0, 9, 0, 10, 0, 10, 0, 10, 0, 10, 0, 11, 0, 10, 0, 12, 1, 0, 0, 12, 0, 13, 0, 13, 0, 11, 0, 14, 1, 14, 0, 14, 0, 14, 0, 15, 0, 12, 0, 16, 0, 15, 0, 15, 0, 17, 0, 16, 0, 13, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
LINKS
|
|
|
FORMULA
|
a(0) = 0; for n > 0, if A009191(n) == 1, a(n) = 0, otherwise a(n) = 1 + a(n-A000005(n)).
|
|
PROG
|
(PARI) A323073(n) = if(!n, 0, my(nn=(n-numdiv(n))); if(1==gcd(n, nn), 0, 1+A323073(nn)));
(PARI) A323073(n) = if(!n, 0, for(j=0, oo, my(nn=(n-numdiv(n))); if((0==nn)||(1==gcd(n, nn)), return(j+(2==n)), n = nn)));
|
|
CROSSREFS
|
Cf. A046642 (positions of zeros after the initial a(0)=0).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|