%I #93 Aug 10 2023 02:21:55
%S 1,1,1,1,1,1,3,1,3,1,5,1,3,3,1,1,4,3,9,1,3,5,11,1,5,3,9,3,7,1,15,2,5,
%T 4,3,3,9,9,3,1,10,3,21,5,3,11,23,1,21,5,4,3,13,9,5,3,9,7,29,1,15,15,9,
%U 4,3,5,33,4,11,3,35,3,18,9,5,9,15,3,39,1
%N The number of quartic terms in the multiplicative group modulo n.
%C In the character table of the multiplicative group modulo n there are phi(n) different characters. [This is made explicit for example by the number of rows in arXiv:1008.2547.] The set of the fourth powers of the characters in all representations has some cardinality, which defines the sequence.
%H Antti Karttunen, <a href="/A250207/b250207.txt">Table of n, a(n) for n = 1..10000</a>
%H R. J. Mathar, <a href="/A293482/a293482.pdf">Size of the Set of Residues of Integer Powers of Fixed Exponent</a>, (2017).
%H R. J. Mathar, <a href="http://arxiv.org/abs/1008.2547">Table of Dirichlet L-series and prime zeta modulo functions for small moduli</a>, arXiv:1008.2547 [math.NT], 2010.
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Dirichlet_character">Dirichlet character</a>.
%F a(n) = A000010(n)/A073103(n).
%F Multiplicative with a(2^e) = 1 for e<=3; a(2^e) = 2^(e-4) for e>=4; a(p^e) = p^(e-1)*(p-1)/4 for e>=1 and p == 1 (mod 4); a(p^e) = p^(e-1)*(p-1)/2 for e>=1 and p == 3 (mod 4). (Derived from A073103.) - _R. J. Mathar_, Oct 13 2017
%e For n <= 6, the set of all characters in all representations consists of a subset of +1, -1, +i or -i. Their fourth powers are all +1, a single value, so a(n)=1 then.
%e For n=7, the set of characters is 1, -1, +-1/2 +- sqrt(3)*i/2, so their fourth powers are 1 or -1/2 +- sqrt(3)*i/2, which are three different values, so a(7)=3.
%e For n=11, the fourth powers of the characters may be 1, exp(+-2*i*Pi/5) or exp(+-4*i*Pi/5), which are 5 different values.
%p A250207 := proc(n)
%p numtheory[phi](n)/A073103(n) ;
%p end proc:
%t a[n_] := EulerPhi[n]/Count[Range[0, n-1]^4 - 1, k_ /; Divisible[k, n]];
%t Array[a, 80] (* _Jean-François Alcover_, Nov 20 2017 *)
%t f[p_, e_] := (p - 1)*p^(e - 1)/If[Mod[p, 4] == 1, 4, 2]; f[2, e_] := If[e <= 3, 1, 2^(e - 4)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Aug 10 2023 *)
%o (PARI) a(n)=my(f=factor(n)); prod(i=1,#f~, if(f[i,1]==2, 2^max(0,f[i,2]-4), f[i,1]^(f[i,2]-1)*(f[i,1]-1)/if(f[i,1]%4==1,4,2))) \\ _Charles R Greathouse IV_, Mar 02 2015
%Y Cf. A046073, A087692, A052273, A293482 - A293485.
%K easy,nonn,mult
%O 1,7
%A _R. J. Mathar_, Mar 02 2015