cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A316506 a(n) is the rank of the multiplicative group of Gaussian integers modulo n.

This page as a plain text file.
%I A316506 #44 Jun 21 2025 20:00:18
%S A316506 0,1,1,2,2,2,1,3,2,3,1,3,2,2,3,3,2,2,1,4,2,2,1,4,2,3,2,3,2,4,1,3,2,3,
%T A316506 3,3,2,2,3,5,2,3,1,3,3,2,1,4,2,3,3,4,2,2,3,4,2,3,1,5,2,2,3,3,4,3,1,4,
%U A316506 2,4,1,4,2,3,3,3,2,4,1,5,2,3,1,4,4,2,3
%N A316506 a(n) is the rank of the multiplicative group of Gaussian integers modulo n.
%C A316506 The rank of a finitely generated group rank(G) is defined to be the size of the minimal generating sets of G.
%C A316506 Let p be an odd prime and (Z[i]/nZ[i])* be the multiplicative group of Gaussian integers modulo n, then: (Z[i]/p^e*Z[i])* = (C_((p-1)*p^(e-1)))^2 if p == 1 (mod 4); C_(p^(e-1)) X C_(p^(e-1)*(p^2-1)) if p == 3 (mod 4). (Z[i]/2Z[i])* = C_2, (Z[i]/2^e*Z[i])* = C_4 X C_(2^(e-2)) X C_(2^(e-1)) for e >= 2. If n = Product_{i=1..k} (p_i)^(e_i), then (Z[i]/nZ[i])* = (Z[i]/(p_1)^(e_1)*Z[i])* X (Z[i]/(p_2)^(e_2)*Z[i])* X ... X (Z[i]/(p_k)^(e_k)*Z[i])*.
%C A316506 The order of (Z[i]/nZ[i])* is A079458(n) and the exponent of it is A227334(n).
%C A316506 {a(n)} is not additive: (Z[i]/2Z[i])* = C_2, (Z[i]/9Z[i])* = C_3 X C_24, so (Z[i]/18Z[i])* = C_6 X C_24, a(18) < a(2) + a(9). The same problem occurs for a(36), a(54) and a(72) and so on. But note that (Z[i]/63Z[i])* = C_3 X C_24 X C_48 and a(63) = a(7) + a(9).
%C A316506 A079458(n)/A227334(n) is always an integer, and is 1 if and only if (Z[i]/nZ[i])* is cyclic, that is, rank((Z[i]/nZ[i])*) = a(n) = 0 or 1, and n has a primitive root in (Z[i]/nZ[i])*. a(n) = 1 if and only if n = 2 or a prime congruent to 3 mod 4. - _Jianing Song_, Jan 08 2019
%C A316506 From _Jianing Song_, Oct 03 2022: (Start)
%C A316506 More generally, let pi be a prime element of Z[i] of norm p or p^2 for prime p, then:
%C A316506 - for p == 1 (mod 4), (Z[i]/(pi^e)Z[i])* = C_((p-1)*p^(e-1));
%C A316506 - for p == 3 (mod 4), (Z[i]/(pi^e)Z[i])* = C_(p^(e-1)) X C_(p^(e-1)*(p^2-1));
%C A316506 - for p = 2, (Z[i]/(pi^e)Z[i])* = C_1 for e = 1, C_2 for e = 2, C_4 X C_(2^floor((e-3)/2)) X C_(2^ceiling((e-3)/2)) for e >= 3.
%C A316506 For a more general result see my link below. (End)
%H A316506 Jianing Song, <a href="/A316506/b316506.txt">Table of n, a(n) for n = 1..10000</a>
%H A316506 Jianing Song, <a href="/A306933/a306933.pdf">Structure of (R/P^e)* for R the ring of integers of a quadratic field and P a prime ideal of R</a>
%F A316506 Let p be an odd prime, then: a(p^e) = 2 if p == 1 (mod 4) or p == 3 (mod 4), e >= 2; a(p) = 1 if p == 3 (mod 4). a(2) = 1, a(4) = 2, a(2^e) = 3 for e >= 3.
%e A316506 (Z[i]/1Z[i])* = C_1 (has rank 0);
%e A316506 (Z[i]/2Z[i])* = C_2 (has rank 1);
%e A316506 (Z[i]/3Z[i])* = C_8 (has rank 1);
%e A316506 (Z[i]/4Z[i])* = C_2 X C_4 (has rank 2);
%e A316506 (Z[i]/5Z[i])* = C_4 X C_4 (has rank 2);
%e A316506 (Z[i]/6Z[i])* = C_2 X C_8 (has rank 2);
%e A316506 (Z[i]/7Z[i])* = C_48 (has rank 1);
%e A316506 (Z[i]/8Z[i])* = C_2 X C_4 X C_4 (has rank 3);
%e A316506 (Z[i]/9Z[i])* = C_3 X C_24 (has rank 2);
%e A316506 (Z[i]/10Z[i])* = C_2 X C_4 X C_4 (has rank 3).
%o A316506 (PARI) rad(n) = factorback(factorint(n)[, 1]);
%o A316506 grad(n)=
%o A316506 {
%o A316506     my(r=1, f=factor(n));
%o A316506     for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
%o A316506         if(p==2&e==1, r*=2);
%o A316506         if(p==2&e==2, r*=4);
%o A316506         if(p==2&e>=3, r*=8);
%o A316506         if(p%4==1, r*=(rad(p-1))^2);
%o A316506         if(p%4==3&e==1, r*=rad(p^2-1));
%o A316506         if(p%4==3&e>=2, r*=p^2*rad(p^2-1));
%o A316506     );
%o A316506     return(r);
%o A316506 }
%o A316506 a(n)=if(n>1, vecmax(factor(grad(n))[, 2]), 0);
%Y A316506 Cf. A046072, A079458, A227334, A302254.
%Y A316506 Equivalent in the ring of Eisenstein integers: A319447.
%K A316506 nonn
%O A316506 1,4
%A A316506 _Jianing Song_, Jul 05 2018