|
|
A079458
|
|
Number of Gaussian integers in a reduced system modulo n.
|
|
23
|
|
|
1, 2, 8, 8, 16, 16, 48, 32, 72, 32, 120, 64, 144, 96, 128, 128, 256, 144, 360, 128, 384, 240, 528, 256, 400, 288, 648, 384, 784, 256, 960, 512, 960, 512, 768, 576, 1296, 720, 1152, 512, 1600, 768, 1848, 960, 1152, 1056, 2208, 1024, 2352, 800, 2048, 1152, 2704
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Number of units in the ring consisting of the Gaussian integers modulo n. - Jason Kimberley, Dec 07 2015
|
|
LINKS
|
|
|
FORMULA
|
Multiplicative with a(2^e) = 2^(2*e-1), a(p^e) = (p^2-1)*p^(2*e-2) if p mod 4=3 and a(p^e) = (p-1)^2*p^(2*e-2) if p mod 4=1.
a(n) = A003557(n)^2 * a(A007947(n)), where a(2)=2, a(p)=(p-1)^2 for prime p=1(mod 4), a(p)=p^2-1 for prime p=3(mod 4), and a(n*m)=a(n)*a(m) for n coprime to m. - Jason Kimberley, Nov 16 2015
Dirichlet g.f.: zeta(s-2) * (1 - 1/2^(s-1)) * Product_{p prime > 2} (1 - 1/p^(s-1) - (-1)^((p-1)/2)*(p-1)/p^s).
Sum_{k=1..n} a(k) = c * n^3 / 3 + O(n^2 * log(n)), where c = (3/4) * Product_{p prime > 2} (1 - 1/p^2 - (-1)^((p-1)/2)*(p-1)/p^3) = (3/4) * A334427 * Product_{p prime == 1 (mod 4)} (1 - 2/p^2 + 1/p^3) = 0.6498027559... (Calderón et al., 2015). (End)
|
|
EXAMPLE
|
{1, i, 1+2i, 2+i, 3, 3i, 3+2i, 2+3i} is the set of eight units in the Gaussian integers modulo 4. - Jason Kimberley, Dec 07 2015
|
|
MAPLE
|
with(GaussInt): seq(GIphi(n), n=1..100);
|
|
MATHEMATICA
|
phi[1]=1; phi[p_, s_] := Which[Mod[p, 4] == 3, p^(2 s - 2) (p^2 - 1), Mod[p, 4] == 1, p^(2 s - 2) ((p - 1))^2, True, 2^(2 s - 1)]; phi[n_] := Product[phi[FactorInteger[n][[i, 1]], FactorInteger[n][[i, 2]]], {i, Length[FactorInteger[n]]}]; Table[phi[n], {n, 1, 33}] (* José María Grau Ribas, Mar 16 2014 *)
f[p_, e_] := (p - 1)*p^(2*e - 1) * If[p == 2, 1, 1 - (-1)^((p-1)/2)/p]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 13 2024 *)
|
|
PROG
|
(Magma) A079458 := func<n|#UnitGroup(quo<IntegerRing(QuadraticField(-1))|n>)>; // Jason Kimberley, Nov 14 2015
(PARI)
a(n)=
{
my(r=1, f=factor(n));
for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
if(p==2, r*=2^(2*e-1));
if(p%4==1, r*=(p-1)^2*p^(2*e-2));
if(p%4==3, r*=(p^2-1)*p^(2*e-2));
);
return(r);
|
|
CROSSREFS
|
|
|
KEYWORD
|
mult,easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|