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.

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

Original entry on oeis.org

8, 24, 40, 72, 88, 40, 56, 184, 232, 264, 280, 312, 328, 408, 424, 56, 520, 552, 120, 648, 664, 712, 760, 792, 840, 296, 904, 952, 200, 1048, 1080, 376, 408, 1240, 120, 1384, 1432, 1464, 1512, 1528, 1672, 344, 584, 1768, 1848, 1864, 1912, 1944, 1960, 664, 2008, 2088, 2184, 2248, 456
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

Also, a(n) is the multiplicative order of the matrix [1,-1;1,1] or [1,1;-1,1] modulo p.
Note that (1+-i)^4 = -4. Since (1+-i)^n is a real number if and only if n is divisible by 4, we have a(n) = 4*ord(-4,p), where ord(a,p) is the multiplicative order of a modulo p.

Examples

			For A002145(4) = 19: Since (1+i)^(4k) = (-4)^k, we have (1+i)^72 == 1 (mod 19), and 72 is the smallest such exponent. Hence a(4) = 72.
		

Crossrefs

Cf. A002145, A384164 ({a(n)/8}), A385165 (multiplicative order of 2+-i).

Programs

  • PARI
    forprime(p=3, 1e3, if(p%4==3, print1(4*znorder(Mod(-4,p)), ", ")))