OFFSET
1,1
COMMENTS
Below 2000 there are only these two cycles of length 3: 36, 78, 48; and 144, 280, 192.
For most composite numbers below 80, the iterated trajectory of f settles on a single-number cycle of 4; those numbers are not in this sequence. - Alonso del Arte, Nov 29 2013
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
36 is in the sequence because f(36) = 78, f(78) = 48 and f(48) = 36, which is a cycle of length 3.
38 is not in the sequence because iterating f from 38 gives the trajectory 38, 12, 8, 10, 6, 4, 4, 4, ... where the cycle has a length of 1.
MATHEMATICA
f[x_] := EulerPhi[DivisorSigma[1, x] - EulerPhi[x]]; Do[s = NestList[f, n, 100]; s1 = Part[s, 98]; s2 = Part[s, 99]; s3 = Part[s, 100]; If[ !Equal[s1, s2], k = k + 1; Print[{k, n, s1, s2, s3}]], {n, 2, 1000}]
f[n_] := EulerPhi[DivisorSigma[1, n]-EulerPhi[n]]; cycleQ[n_] := With[{nn = NestWhileList[f, n, Unequal, All]}, nn[[-1]] != nn[[-2]]]; Select[Range[200], cycleQ] (* Jean-François Alcover, Nov 29 2013 *)
PROG
(PARI) f(x)=if(x>35, eulerphi(sigma(x)-eulerphi(x)), 1)
is(n)=my(t=f(n), h=f(t)); while(t!=h, h=f(f(h)); t=f(t)); f(t)!=t \\ Charles R Greathouse IV, Nov 29 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Oct 31 2002
EXTENSIONS
Name corrected by Charles R Greathouse IV, Nov 29 2013
STATUS
approved