OFFSET
1,2
COMMENTS
Ordinal transform of Euler totient function phi, A000010. - Antti Karttunen, Aug 26 2024
LINKS
Paul Tek, Table of n, a(n) for n = 1..100000
Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems (invphi.gp).
EXAMPLE
For n = 16: phi(k) = {1,1,2,2,4,2,6,4,6,4,10,4,12,6,8,8} for k = 1,...,n; 2 numbers exist with phi(k) = phi(n) = 8: {15,16}, so a(16) = 2.
If n = p is an odd prime number, then a(p) = 1 with phi(k) = p-1.
MATHEMATICA
f[x_] := Count[Table[EulerPhi[j]-EulerPhi[x], {j, 1, x}], 0] Table[f[w], {w, 1, 100}]
PROG
(PARI) a(n)=my(t=eulerphi(n), s); sum(k=1, n, eulerphi(k)==t) \\ Charles R Greathouse IV, Feb 21 2013, corrected by Antti Karttunen, Aug 26 2024
(PARI) a(n) = #select(x -> x <= n, invphi(eulerphi(n))); \\ Amiram Eldar, Nov 08 2024, using Max Alekseyev's invphi.gp
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Mar 24 2003
STATUS
approved