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.

This page as a plain text file.
%I A385165 #22 Jun 21 2025 19:59:14
%S A385165 8,48,30,180,528,96,1848,2208,1740,1496,360,1560,2296,10608,11448,
%T A385165 5376,4290,1932,11400,8856,27888,16020,1216,3300,3710,49728,51528,
%U A385165 14280,3150,69168,7344,80088,8568,48360,13695,40136,6444,44896,7980,146688,29260,92880,48180
%N 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.
%C A385165 A002145 are precisely the rational primes in the ring of Gaussian integers.
%C A385165 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.
%C A385165 a(n) is divisible by ord(5,p): If (2+-i)^n == 1 (mod p), then 5^n == 1 (mod p).
%C A385165 a(n) divides (p+1) * ord(5,p), since we have (2+-i)^(p+1) == 5 (mod p).
%C A385165 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.
%H A385165 Jianing Song, <a href="/A385165/b385165.txt">Table of n, a(n) for n = 1..10000</a>
%e A385165 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.
%o A385165 (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)
%o A385165 forprime(p=3, 1e3, if(p%4==3, print1(ord(p), ", ")))
%Y A385165 Cf. A002145, A211241, A385163 (multiplicative order of 1+-i), A385166.
%K A385165 nonn,easy
%O A385165 1,1
%A A385165 _Jianing Song_, Jun 20 2025