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.

Showing 1-9 of 9 results.

A079458 Number of Gaussian integers in a reduced system modulo n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Vladeta Jovovic, Jan 14 2003

Keywords

Comments

Number of units in the ring consisting of the Gaussian integers modulo n. - Jason Kimberley, Dec 07 2015

Examples

			{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
		

Crossrefs

Equals four times A218147. - Jason Kimberley, Nov 14 2015
Sequences giving the number of solutions to the equation GCD(x_1^2+...+x_k^2, n) = 1 with 0 < x_i <= n: A000010 (k=1), A079458 (k=2), A053191 (k=3), A227499 (k=4), A238533 (k=5), A238534 (k=6), A239442 (k=7), A239441 (k=8), A239443 (k=9).
Equivalent of arithmetic functions in the ring of Gaussian integers (the corresponding functions in the ring of integers are in the parentheses): A062327 ("d", A000005), A317797 ("sigma", A000203), this sequence ("phi", A000010), A227334 ("psi", A002322), A086275 ("omega", A001221), A078458 ("Omega", A001222), A318608 ("mu", A008683).
Equivalent in the ring of Eisenstein integers: A319445.

Programs

  • Magma
    A079458 := func)>; // Jason Kimberley, Nov 14 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 *)
  • 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);
    } \\ Jianing Song, Sep 16 2018

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
From Amiram Eldar, Feb 13 2024: (Start)
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)
a(n) = A204617(n)*A062570(n). - Ridouane Oudra, Jun 05 2024

A062327 Number of divisors of n over the Gaussian integers.

Original entry on oeis.org

1, 3, 2, 5, 4, 6, 2, 7, 3, 12, 2, 10, 4, 6, 8, 9, 4, 9, 2, 20, 4, 6, 2, 14, 9, 12, 4, 10, 4, 24, 2, 11, 4, 12, 8, 15, 4, 6, 8, 28, 4, 12, 2, 10, 12, 6, 2, 18, 3, 27, 8, 20, 4, 12, 8, 14, 4, 12, 2, 40, 4, 6, 6, 13, 16, 12, 2, 20, 4, 24, 2, 21, 4, 12, 18, 10, 4, 24, 2, 36, 5, 12, 2, 20, 16, 6
Offset: 1

Views

Author

Reiner Martin, Jul 12 2001

Keywords

Comments

Divisors which are associates are identified (two Gaussian integers z1, z2 are associates if z1 = u * z2 where u is a unit, i.e., one of 1, i, -1, -i).
a(A004614(n)) = A000005(n). - Vladeta Jovovic, Jan 23 2003
a(A004613(n)) = A000005(n)^2. - Benedikt Otten, May 22 2013

Examples

			For example, 5 has divisors 1, 1+2i, 2+i and 5.
		

Crossrefs

Equivalent of arithmetic functions in the ring of Gaussian integers (the corresponding functions in the ring of integers are in the parentheses): this sequence ("d", A000005), A317797 ("sigma", A000203), A079458 ("phi", A000010), A227334 ("psi", A002322), A086275 ("omega", A001221), A078458 ("Omega", A001222), A318608 ("mu", A008683).
Equivalent in the ring of Eisenstein integers: A319442.

Programs

  • Haskell
    a062327 n = product $ zipWith f (a027748_row n) (a124010_row n) where
       f 2 e                  = 2 * e + 1
       f p e | p `mod` 4 == 1 = (e + 1) ^ 2
             | otherwise      = e + 1
    -- Reinhard Zumkeller, Oct 18 2011
    
  • Maple
    a:= n-> mul(`if`(i[1]=2, 2*i[2]+1, `if`(irem(i[1], 4)=3,
                     i[2]+1, (i[2]+1)^2)), i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 09 2021
  • Mathematica
    Table[Length[Divisors[n, GaussianIntegers -> True]], {n, 30}] (* Alonso del Arte, Jan 25 2011 *)
    DivisorSigma[0,Range[90],GaussianIntegers->True] (* Harvey P. Dale, Mar 19 2017 *)
  • 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*e+1));
            if(p%4==1,r*=(e+1)^2);
            if(p%4==3,r*=(e+1));
        );
        return(r);
    }  \\ Joerg Arndt, Dec 09 2016

Formula

Presumably a(n) = 2 iff n is a rational prime == 3 mod 4 (see A045326). - N. J. A. Sloane, Jan 07 2003, Feb 23 2007
Multiplicative with a(2^e) = 2*e+1, a(p^e) = e+1 if p mod 4=3 and a(p^e) = (e+1)^2 if p mod 4=1. - Vladeta Jovovic, Jan 23 2003

A078458 Total number of factors in a factorization of n into Gaussian primes.

Original entry on oeis.org

0, 2, 1, 4, 2, 3, 1, 6, 2, 4, 1, 5, 2, 3, 3, 8, 2, 4, 1, 6, 2, 3, 1, 7, 4, 4, 3, 5, 2, 5, 1, 10, 2, 4, 3, 6, 2, 3, 3, 8, 2, 4, 1, 5, 4, 3, 1, 9, 2, 6, 3, 6, 2, 5, 3, 7, 2, 4, 1, 7, 2, 3, 3, 12, 4, 4, 1, 6, 2, 5, 1, 8, 2, 4, 5, 5, 2, 5, 1, 10, 4, 4, 1, 6, 4, 3, 3, 7, 2, 6, 3, 5, 2, 3, 3, 11, 2, 4, 3, 8, 2, 5, 1, 8
Offset: 1

Views

Author

N. J. A. Sloane, Jan 11 2003

Keywords

Comments

a(n)+1 is also the total number of factors in a factorization of n+n*i into Gaussian primes. - Jason Kimberley, Dec 17 2011
Record high values are at a(2^k) = 2*k for k = 0, 1, 2, ... . - Bill McEachen, Oct 11 2022

Examples

			2 = (1+i)*(1-i), so a(2) = 2; 9 = 3*3, so a(9) = 2.
a(1006655265000) = a(2^3*3^2*5^4*7^5*11^3) = 3*a(2)+2*a(3)+4*a(5)+5*a(7)+3*a(11) = 3*2+2*1+4*2+5*1+3*1 = 24. - _Vladeta Jovovic_, Jan 20 2003
		

Crossrefs

Cf. A239626, A239627 (including units).
Equivalent of arithmetic functions in the ring of Gaussian integers (the corresponding functions in the ring of integers are in the parentheses): A062327 ("d", A000005), A317797 ("sigma", A000203), A079458 ("phi", A000010), A227334 ("psi", A002322), A086275 ("omega", A001221), this sequence ("Omega", A001222), A318608 ("mu", A008683).
Equivalent in the ring of Eisenstein integers: A319444.

Programs

  • Mathematica
    Join[{0}, Table[f = FactorInteger[n, GaussianIntegers -> True]; cnt = Total[Transpose[f][[2]]]; If[MemberQ[{-1, I, -I}, f[[1, 1]]], cnt--]; cnt, {n, 2, 100}]] (* T. D. Noe, Mar 31 2014 *)
    a[n_]:=PrimeOmega[n, GaussianIntegers -> True]; Array[a,104] (* Stefano Spezia, Sep 29 2024 *)
  • PARI
    a(n)=my(f=factor(n)); sum(i=1,#f~,if(f[i,1]%4==3,1,2)*f[i,2]) \\ Charles R Greathouse IV, Mar 31 2014

Formula

Fully additive with a(p)=2 if p=2 or p mod 4=1 and a(p)=1 if p mod 4=3. - Vladeta Jovovic, Jan 20 2003
a(n) depends on the number of primes of the forms 4k+1 (A083025) and 4k-1 (A065339) and on the highest power of 2 dividing n (A007814): a(n) = 2*A007814(n) + 2*A083025(n) + A065339(n). - T. D. Noe, Jul 14 2003

Extensions

More terms from Vladeta Jovovic, Jan 12 2003

A086275 Number of distinct Gaussian primes in the factorization of n.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 1, 1, 1, 3, 1, 2, 2, 2, 3, 1, 2, 2, 1, 3, 2, 2, 1, 2, 2, 3, 1, 2, 2, 4, 1, 1, 2, 3, 3, 2, 2, 2, 3, 3, 2, 3, 1, 2, 3, 2, 1, 2, 1, 3, 3, 3, 2, 2, 3, 2, 2, 3, 1, 4, 2, 2, 2, 1, 4, 3, 1, 3, 2, 4, 1, 2, 2, 3, 3, 2, 2, 4, 1, 3, 1, 3, 1, 3, 4, 2, 3, 2, 2, 4, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3
Offset: 1

Views

Author

T. D. Noe, Jul 14 2003

Keywords

Comments

As shown in the formula, a(n) depends on the number of distinct primes of the forms 4*k+1 (A005089) and 4*k-1 (A005091) and whether n is divisible by 2 (A059841).
Note that associated divisors are counted only once. - Jianing Song, Aug 30 2018

Examples

			a(1006655265000) = a(2^3*3^2*5^4*7^5*11^3) = 1 + 2*1 + 3 = 6 because n is divisible by 2, has 1 prime factor of the form 4*k+1 and 3 primes of the form 4*k+3. Over the Gaussian integers, 1006655265000 is factored as i*(1 + i)^6*(2 + i)^4*(2 - i)^4*3^2*7^5*11^3, the 6 distinct Gaussian factors are 1 + i, 2 + i, 2 - i, 3, 7 and 11.
		

Crossrefs

Equivalent of arithmetic functions in the ring of Gaussian integers (the corresponding functions in the ring of integers are in the parentheses): A062327 ("d", A000005), A317797 ("sigma", A000203), A079458 ("phi", A000010), A227334 ("psi", A002322), this sequence ("omega", A001221), A078458 ("Omega", A001222), A318608 ("mu", A008683).
Equivalent in the ring of Eisenstein integers: A319443.

Programs

  • Mathematica
    Join[{0}, Table[f=FactorInteger[n, GaussianIntegers->True]; cnt=Length[f]; If[MemberQ[{-1, I, -I}, f[[1, 1]]], cnt-- ]; cnt, {n, 2, 100}]]
    a[n_]:=If[n==2,1,PrimeNu[n, GaussianIntegers -> True]]; Array[a,100] (* Stefano Spezia, Sep 29 2024 *)
  • PARI
    a(n)=my(f=factor(n)[,1]); sum(i=1,#f,if(f[i]%4==1,2,1)) \\ Charles R Greathouse IV, Sep 14 2015

Formula

a(n) = A059841(n) + 2*A005089(n) + A005091(n).
Additive with a(p^e) = 2 if p = 1 (mod 4), 1 otherwise. - Franklin T. Adams-Watters, Oct 18 2006

A317797 Sum of the norm of divisors of n over Gaussian integers, with associated divisors counted only once.

Original entry on oeis.org

1, 7, 10, 31, 36, 70, 50, 127, 91, 252, 122, 310, 196, 350, 360, 511, 324, 637, 362, 1116, 500, 854, 530, 1270, 961, 1372, 820, 1550, 900, 2520, 962, 2047, 1220, 2268, 1800, 2821, 1444, 2534, 1960, 4572, 1764, 3500, 1850, 3782, 3276, 3710, 2210, 5110, 2451, 6727
Offset: 1

Views

Author

Jianing Song, Aug 07 2018

Keywords

Comments

Equivalent of sigma (A000203) in the ring of Gaussian integers. Note that only norms are summed up.

Examples

			Let ||d|| denote the norm of d.
a(2) = ||1|| + ||1 + i|| + ||2|| = 1 + 2 + 4 = 7.
a(5) = ||1|| + ||2 + i|| + ||2 - i|| + ||5|| = 1 + 5 + 5 + 25 = 36. Note that 2 - i and 1 + 2i are associated so their norm is only counted once.
		

Crossrefs

Cf. A001157.
Equivalent of arithmetic functions in the ring of Gaussian integers (the corresponding functions in the ring of integers are in the parentheses): A062327 ("d", A000005), this sequence ("sigma", A000203), A079458 ("phi", A000010), A227334 ("psi", A002322), A086275 ("omega", A001221), A078458 ("Omega", A001222), A318608 ("mu", A008683).
Equivalent in the ring of Eisenstein integers: A319449.

Programs

  • Mathematica
    f[p_, e_] := If[p == 2, 2^(2*e + 1) - 1, Switch[Mod[p, 4], 1, ((p^(e + 1) - 1)/(p - 1))^2, 3, (p^(2 e + 2) - 1)/(p^2 - 1)]]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 12 2020 *)
  • 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)-1));
            if(Mod(p,4)==1, r*=((p^(e+1)-1)/(p-1))^2);
            if(Mod(p,4)==3, r*=(p^(2*e+2)-1)/(p^2-1));
        );
        return(r);
    }

Formula

Multiplicative with a(2^e) = sigma(2^(2e)) = 2^(2e+1) - 1, a(p^e) = sigma(p^e)^2 = ((p^(e+1) - 1)/(p - 1))^2 if p == 1 (mod 4) and sigma_2(p^e) = A001157(p^e) = (p^(2e+2) - 1)/(p^2 - 1) if p == 3 (mod 4).

A318608 Moebius function mu(n) defined for the Gaussian integers.

Original entry on oeis.org

1, 0, -1, 0, 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 0, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0
Offset: 1

Views

Author

Jianing Song, Aug 30 2018

Keywords

Comments

Just like the original Moebius function over the integers, a(n) = 0 if n has a squared Gaussian prime factor, otherwise (-1)^t if n is a product of a Gaussian unit and t distinct Gaussian prime factors.
a(n) = 0 for even n since 2 = -i*(1 + i)^2 contains a squared factor. For rational primes p == 1 (mod 4), p is always factored as (x + y*i)(x - y*i), x + y*i and x - y*i are not associated so a(p) = (-1)*(-1) = 1.
Interestingly, a(n) and A091069(n) have the same absolute value (= |A087003(n)|), since the discriminants of the quadratic fields Q[i] and Q[sqrt(2)] are -4 and 8 respectively, resulting in Q[i] and Q[sqrt(2)] being two of the three quadratic fields with discriminant a power of 2 or negated (the other one being Q[sqrt(-2)] with discriminant -8).

Examples

			a(15) = -1 because 15 is factored as 3*(2 + i)*(2 - i) with three distinct Gaussian prime factors.
a(21) = (-1)*(-1) = 1 because 21 = 3*7 where 3 and 7 are congruent to 3 mod 4 (thus being Gaussian primes).
		

Crossrefs

Absolute values are the same as those of A087003.
First row and column of A103226.
Cf. A101455.
Equivalent of arithmetic functions in the ring of Gaussian integers (the corresponding functions in the ring of integers are in the parentheses): A062327 ("d", A000005), A317797 ("sigma", A000203), A079458 ("phi", A000010), A227334 ("psi", A002322), A086275 ("omega", A001221), A078458 ("Omega", A001222), this sequence ("mu", A008683).
Equivalent in the ring of Eisenstein integers: A319448.
Cf. A091069 (Moebius function over Z[sqrt(2)]).

Programs

  • Mathematica
    f[p_, e_] := If[p == 2 || e > 1, 0, Switch[Mod[p, 4], 1, 1, 3, -1]]; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 10 2020 *)
  • 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||e>=2, r=0);
            if(Mod(p,4)==3&e==1, r*=-1);
        );
        return(r);
    }

Formula

a(n) = 0 if n even or has a square prime factor, otherwise Product_{p divides n} (2 - (p mod 4)) where the product is taken over the primes.
Multiplicative with a(p^e) = 0 if p = 2 or e > 1, a(p) = 1 if p == 1 (mod 4) and -1 if p == 3 (mod 4).
a(n) = 0 if A078458(n) != A086275(n), otherwise (-1)^A086275(n).
a(n) = A103226(n,0) = A103226(0,n).
For squarefree n, a(n) = Kronecker symbol (-4, n) = A101455(n). Also for these n, a(n) = A091069(n) if n even or n == 1 (mod 8), otherwise -A091069(n).

A319446 Exponent of the group of the Eisenstein integers in a reduced system modulo n.

Original entry on oeis.org

1, 3, 6, 6, 24, 6, 6, 12, 6, 24, 120, 6, 12, 6, 24, 24, 288, 6, 18, 24, 6, 120, 528, 12, 120, 12, 18, 6, 840, 24, 30, 48, 120, 288, 24, 6, 36, 18, 12, 24, 1680, 6, 42, 120, 24, 528, 2208, 24, 42, 120, 288, 12, 2808, 18, 120, 12, 18, 840, 3480, 24, 60
Offset: 1

Views

Author

Jianing Song, Sep 19 2018

Keywords

Comments

Equivalent of psi (A002322) in the ring of Eisenstein integers.
a(n) is the exponent of the multiplicative group of Eisenstein integers modulo n, i.e., (Z[w]/nZ[w])* = {a + b*w : a, b in Z/nZ and gcd(a^2 + a*b + b^2, n) = 1} where w = (1 + sqrt(3)*i)/2. The number of elements in (Z[w]/nZ[w])* is A319445(n).
a(n) is the smallest e such that for any Eisenstein integer z coprime to n we have z^e == 1 (mod n).
By definition, A319445(n)/a(n) is always an integer, and is 1 iff (Z[w]/nZ[w])* is cyclic, that is, rank((Z[w]/nZ[w])*) = A319447(n) = 0 or 1, and n has a primitive root in (Z[w]/nZ[w])*. A319445(n)/a(n) = 1 iff n = 1, 3 or a prime congruent to 2 mod 3.
For n > 2, a(n) is divisible by 6.

Examples

			Let w = (1 + sqrt(3)*i)/2, w' = (1 - sqrt(3)*i)/2.
Let G = (Z[w]/4Z[w])* = {1, w, 1 + w, w', 1 + w', -1 + 2w, -1, -w, -1 - w, -w', -1 - w', -1 + 2w'}. The possibilities for the exponent of G are 12, 6, 4, 3, 2 and 1. G^6 = {x^6 mod 4 : x belongs to G} = {1} and w^3 !== 1 (mod 4), w^4 !== 1 (mod 4). Therefore, the exponent of G is greater than 4, accordingly the exponent of G is 6 and a(4) = 6.
		

Crossrefs

Equivalent of arithmetic functions in the ring of Eisenstein integers (the corresponding functions in the ring of integers are in the parentheses): A319442 ("d", A000005), A319449 ("sigma", A000203), A319445 ("phi", A000010), this sequence ("psi", A002322), A319443 ("omega", A001221), A319444 ("Omega", A001222), A319448 ("mu", A008683).
Equivalent in the ring of Gaussian integers: A227334.

Programs

  • Mathematica
    f[p_, e_] := If[p == 3 , If[e == 1, 6, 2*3^(e - 1)], Switch[Mod[p, 3], 1, (p - 1)*p^(e - 1), 2, (p^2 - 1)*p^(e - 1)]]; eisPsi[1] = 1; eisPsi[n_] := LCM @@ f @@@ FactorInteger[n]; Array[eisPsi, 100]  (* Amiram Eldar, Feb 10 2020 *)
  • 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==3, r=lcm(r,2*3^max(e-1,1)));
            if(p%3==1, r=lcm(r,(p-1)*p^(e-1)));
            if(p%3==2, r=lcm(r,(p^2-1)*p^(e-1)));
        );
        return(r);
    }

Formula

a(3) = 6, a(3^e) = 2*3^(e-1) for e >= 2; a(p^e) = (p - 1)*p^(e-1) if p == 1 (mod 3) and (p^2 - 1)*p^(e-1) if p == 2 (mod 3). If gcd(m, n) = 1 then a(mn) = lcm(a(m), a(n)). [See the group structure of (Z[w]/(pi^e)Z[w])* in A319447, where pi is a prime element in Z[w]. - Jianing Song, Oct 03 2022]

Extensions

Corrected by Jianing Song, Jan 12 2019

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

Original entry on oeis.org

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, 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, 2, 4, 1, 4, 2, 3, 3, 3, 2, 4, 1, 5, 2, 3, 1, 4, 4, 2, 3
Offset: 1

Views

Author

Jianing Song, Jul 05 2018

Keywords

Comments

The rank of a finitely generated group rank(G) is defined to be the size of the minimal generating sets of G.
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])*.
The order of (Z[i]/nZ[i])* is A079458(n) and the exponent of it is A227334(n).
{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).
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
From Jianing Song, Oct 03 2022: (Start)
More generally, let pi be a prime element of Z[i] of norm p or p^2 for prime p, then:
- for p == 1 (mod 4), (Z[i]/(pi^e)Z[i])* = C_((p-1)*p^(e-1));
- for p == 3 (mod 4), (Z[i]/(pi^e)Z[i])* = C_(p^(e-1)) X C_(p^(e-1)*(p^2-1));
- 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.
For a more general result see my link below. (End)

Examples

			(Z[i]/1Z[i])* = C_1 (has rank 0);
(Z[i]/2Z[i])* = C_2 (has rank 1);
(Z[i]/3Z[i])* = C_8 (has rank 1);
(Z[i]/4Z[i])* = C_2 X C_4 (has rank 2);
(Z[i]/5Z[i])* = C_4 X C_4 (has rank 2);
(Z[i]/6Z[i])* = C_2 X C_8 (has rank 2);
(Z[i]/7Z[i])* = C_48 (has rank 1);
(Z[i]/8Z[i])* = C_2 X C_4 X C_4 (has rank 3);
(Z[i]/9Z[i])* = C_3 X C_24 (has rank 2);
(Z[i]/10Z[i])* = C_2 X C_4 X C_4 (has rank 3).
		

Crossrefs

Equivalent in the ring of Eisenstein integers: A319447.

Programs

  • PARI
    rad(n) = factorback(factorint(n)[, 1]);
    grad(n)=
    {
        my(r=1, f=factor(n));
        for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
            if(p==2&e==1, r*=2);
            if(p==2&e==2, r*=4);
            if(p==2&e>=3, r*=8);
            if(p%4==1, r*=(rad(p-1))^2);
            if(p%4==3&e==1, r*=rad(p^2-1));
            if(p%4==3&e>=2, r*=p^2*rad(p^2-1));
        );
        return(r);
    }
    a(n)=if(n>1, vecmax(factor(grad(n))[, 2]), 0);

Formula

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.

A302254 Exponent of the group of the Gaussian integers in a reduced system modulo (1+i)^n.

Original entry on oeis.org

1, 1, 2, 4, 4, 4, 4, 4, 8, 8, 16, 16, 32, 32, 64, 64, 128, 128, 256, 256, 512, 512, 1024, 1024, 2048, 2048, 4096, 4096, 8192, 8192, 16384, 16384, 32768, 32768, 65536, 65536, 131072, 131072, 262144, 262144, 524288, 524288, 1048576, 1048576, 2097152, 2097152, 4194304, 4194304, 8388608, 8388608
Offset: 0

Views

Author

Jianing Song, Apr 04 2018

Keywords

Comments

For n > 0, the number of elements in the group of the Gaussian integers in a reduced system modulo (1+i)^n is 2^(n-1).

Examples

			For Gaussian integer x such that (x, 1+i) = 1, x^4 - 1 = (x + 1)(x - 1)(x + i)(x - i) provides at least 7 factors of 1+i in total (and exactly 7 when x = 2+i), so a(7) = 4.
		

Crossrefs

Programs

  • Magma
    [1,1,2,4,4,4] cat [2^(Floor(n div 2)-1): n in [6..50]]; // Vincenzo Librandi, Apr 04 2018
  • Mathematica
    Join[{1, 1, 2, 4, 4, 4}, Table[2^(Floor[n/2] - 1), {n, 6, 50}]] (* Vincenzo Librandi, Apr 04 2018 *)

Formula

For n > 5, a(n) = 2^(floor(n/2) - 1).
For even n, a(n) = A227334(2^(n/2)).
Showing 1-9 of 9 results.