login
a(n) = card({k : phi(k) == n (mod k)}).
2

%I #27 Dec 05 2024 09:55:20

%S 1,3,1,4,2,5,1,7,2,3,2,7,2,5,2,7,2,5,2,10,2,3,3,15,2,3,2,5,3,3,1,12,4,

%T 5,2,9,2,7,2,12,3,7,2,8,4,3,2,16,2,5,3,4,4,9,2,10,2,3,4,12,2,5,2,15,3,

%U 3,2,9,5,5,2,20,2,5,3,8,3,5,2,15,2,3,5,12,2

%N a(n) = card({k : phi(k) == n (mod k)}).

%C Note that k=1 is excluded from the count. - _Michel Marcus_, Feb 22 2021

%H Amiram Eldar, <a href="/A066899/b066899.txt">Table of n, a(n) for n = 1..10000</a>

%H Max Alekseyev, <a href="https://oeis.org/wiki/User:Max_Alekseyev/gpscripts">PARI/GP Scripts for Miscellaneous Math Problems</a> (invphi.gp).

%o (PARI) a(n) = {my(v = invphi(n), m = if (#v, vecmax(v), n)); sum(i=2, m, Mod(eulerphi(i), i) == n);} \\ _Michel Marcus_, Feb 22 2021; needs invphi.gp

%Y Cf. A000010, A014197, A066900.

%K nonn

%O 1,2

%A _Benoit Cloitre_, Jan 24 2002

%E More terms from _Michel Marcus_, Feb 22 2021