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.

A385165 Let p = A002145(n) be the n-th prime == 3 (mod 4); a(n) is the multiplicative order of 2+-i modulo p in Gaussian integers.

Original entry on oeis.org

8, 48, 30, 180, 528, 96, 1848, 2208, 1740, 1496, 360, 1560, 2296, 10608, 11448, 5376, 4290, 1932, 11400, 8856, 27888, 16020, 1216, 3300, 3710, 49728, 51528, 14280, 3150, 69168, 7344, 80088, 8568, 48360, 13695, 40136, 6444, 44896, 7980, 146688, 29260, 92880, 48180
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

A002145 are precisely the rational primes in the ring of Gaussian integers.
From the representation of complex numbers as 2 X 2 matrices, a(n) is also the multiplicative order of the matrix [2,-1;1,2] or [2,1;-1,2] modulo p.
a(n) is divisible by ord(5,p): If (2+-i)^n == 1 (mod p), then 5^n == 1 (mod p).
a(n) divides (p+1) * ord(5,p), since we have (2+-i)^(p+1) == 5 (mod p).
If 5 is a quadratic residue modulo p, then ord(5,p) divides (p-1)/2, and so a(n) divides (p^2-1)/2. Conversely, if a(n) divides (p^2-1)/2, then (x+-y*i)^2 == 2+-i (mod p) for some integers x, y, and so (x^2+y^2)^2 == 5 (mod p), which means that 5 is a quadratic residue modulo p.

Examples

			The multiplicative order of 2+-i modulo A002145(3) = 11 is a(3) = 30, since (2+-i)^30 == 1 (mod 11), and 30 is the smallest such exponent.
		

Crossrefs

Cf. A002145, A211241, A385163 (multiplicative order of 1+-i), A385166.

Programs

  • PARI
    ord(p) = my(d = divisors((p+1)*znorder(Mod(5,p)))); for(i=1, #d, if(Mod([2,-1;1,2],p)^d[i] == 1, return(d[i]))) \\ for a prime p == 3 (mod 4), returns ord(2+-i,p)
    forprime(p=3, 1e3, if(p%4==3, print1(ord(p), ", ")))