|
|
A176839
|
|
The number of iterations to reach 1 under the map x -> x-tau(phi(x)), starting at n.
|
|
1
|
|
|
0, 1, 1, 2, 2, 3, 2, 3, 3, 3, 3, 4, 3, 4, 4, 5, 5, 5, 4, 6, 5, 6, 5, 7, 5, 7, 6, 7, 6, 8, 6, 7, 7, 7, 7, 9, 8, 8, 7, 8, 8, 10, 8, 9, 9, 11, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11, 11, 12, 11, 12, 12, 12, 12, 12, 12, 13, 11, 12, 13, 13, 12, 13, 13, 13, 12, 13, 14, 14, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Tau(n) = A000005(n) is the number of divisors of n, and phi(n) = A000010(n) is the Euler totient function.
|
|
LINKS
|
|
|
EXAMPLE
|
a(12)=4 because
f(12) = 12 - tau(phi(12)) = 12 - tau(4) = 12 - 3 = 9;
f(9) = 9 - tau(phi(9)) = 9 - tau(6) = 9 - 4 = 5;
f(5) = 5 - tau(phi(5)) = 5 - tau(4) = 5 - 3 = 2;
f(2) = 2 - tau(phi(2)) = 2 - tau(1) = 2 - 1 = 1, and a(12) = 4.
|
|
MAPLE
|
numtheory[tau](numtheory[phi](n)) ;
end proc:
a := 0 ;
x := n ;
while x <> 1 do
a := a+1 ;
end do:
a ;
|
|
MATHEMATICA
|
f[n_] := If[n == 1, 1, n - DivisorSigma[0, EulerPhi[n]]];
a[n_] := Length[FixedPointList[f, n]] - 2;
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|