OFFSET
1,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
Since phi(78) = 24, 78 - phi(78) = cototient(78) = 54, phi(54) = 18. On the other hand, cototient(24) = 24 - phi(24) = 24 - 8 = 16, and because 16 < 18, 78 is a term of this sequence.
MATHEMATICA
co[n_] := n - EulerPhi[n]; Select[Range[400], co[EulerPhi[#]] < EulerPhi[ co[#]] &] (* Harvey P. Dale, May 29 2013 *)
Select[Range[400], EulerPhi[#] - EulerPhi[EulerPhi[#]] < EulerPhi[# - EulerPhi[#]] &] (* Alonso del Arte, Jun 12 2013 *)
PROG
(PARI) { n=0; for (m = 2, 10^9, t=eulerphi(m); c=m - t; if (t - eulerphi(t) < eulerphi(c), write("b065154.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 13 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Oct 19 2001
STATUS
approved