OFFSET
1,2
COMMENTS
For totient values prime numbers give similar records.
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
FORMULA
a=0; s=0; Do[s=n-EulerPhi[n]; If[s>a, a=s; Print[n]], {n, 1, 10000}]
EXAMPLE
MATHEMATICA
With[{s = Array[# - EulerPhi@ # &, 10^3]}, Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* Michael De Vlieger, May 16 2018 *)
PROG
(PARI) r=-1; for(n=1, 1000, d=n-eulerphi(n); if(r<d, r=d; print1(n, ", ")))
(PARI) { n=0; x=-1; for (m=1, 10^9, c=m - eulerphi(m); if (c > x, x=c; write("b065385.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 17 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 05 2001
STATUS
approved