OFFSET
1,6
COMMENTS
In [Guy 1997] the iteration is said to fracture when sigma(x)+phi(x) becomes odd. It is not known if a(n)=0 for some n.
A156776(n) gives the number of iterations until the sequence fractures, resp. 0 if this never happens.
LINKS
Richard K. Guy, Divisors and desires, Amer. Math. Monthly, 104 (1997), 359-360.
EXAMPLE
Let f(x)=(sigma(x)+phi(x))/2. For x=1 we have f(x) = (1+1)/2 = 1, i.e. after a(1)=1 iterations, the initial term 1 is encountered. For x=2 we have f(x) = (3+1)/2 = 2, so a(2)=1 for the same reason; idem for x=3 and x=5. For x=4 we have f(x) = (7+2)/2 = 9/2, the sequence "fractures" after a(4)=1 iterations. For x=6 we have f(x) = (12+2)/2 = 7, f(7) = (8+6)/2 = 7: after a(6)=2 iterations, there's a value already seen before.
MATHEMATICA
f[n_] := If[IntegerQ[n], n, 0]; g[n_] := f[(DivisorSigma[1, n] + EulerPhi[n])/2]; a[n_] := Module[{s = NestWhileList[g, n, UnsameQ, All]}, Length[s] - If[s[[-1]] == 0, 2, 1]]; Array[a, 105] (* Amiram Eldar, Apr 01 2024 *)
PROG
(PARI) A156775(n, u=[])={ until( denominator( n=(sigma(n)+eulerphi(n))/2)>1 || setsearch(u, n), u=setunion(u, Set(n))); #u }
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Feb 15 2009
STATUS
approved