OFFSET
1,2
COMMENTS
Final term of n-th row of A077661.
LINKS
Franklin T. Adams-Watters, Table of n, a(n) for n = 1..1000
MATHEMATICA
Join[{1}, Table[Select[Range[5000], !CoprimeQ[#, n]&][[n]], {n, 2, 60}]] (* Harvey P. Dale, May 26 2023 *)
PROG
(PARI) a(n) = local(i, k); if(n<=1, n, k=n-eulerphi(n); i=n\k; k*=i; i*=n; while(k<n, k+=(gcd(i++, n)!=1)); i)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 14 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 27 2003
STATUS
approved