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-10 of 14 results. Next

A385166 Let p = A002145(n) be the n-th prime == 3 (mod 4); a(n) = (p+1) * ord(5,p) / ord(2+-i,p) = (p+1) * ord(5,p) / A385165(n). Here ord(a,m) is the multiplicative order of a modulo m.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 5, 1, 1, 1, 1, 3, 2, 2, 1, 1, 2, 2, 1, 1, 1, 11, 1, 4, 3, 10, 1, 1, 1, 3, 1, 2, 1, 1, 1, 6, 1, 6, 1, 3, 1, 1, 1, 4, 3, 24, 1, 1, 1, 1, 1, 3, 1, 4, 2, 1, 1, 1, 1, 1, 2, 1, 1, 8, 1, 27, 1, 1, 1, 1, 20, 3, 1, 4, 1, 1
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

Of course if a and m are integers, it doesn't matter if the base ring is Z or Z[i] for ord(a,m).

Examples

			The multiplicative order of 2+-i modulo A002145(3) = 11 is A385165(3) = 30, so a(3) = (12*ord(5,11))/30 = 2.
The multiplicative order of 2+-i modulo A002145(13) = 83 is A385165(13) = 2296, so a(13) = (84*ord(5,83))/2296 = 3.
		

Crossrefs

Cf. A002145, A385165. Primes corresponding to special terms: A385168 (>1), A385167 (even), A385180 (divisible by 4).
Cf. A211450.

Programs

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

A385169 Primes p == 3 (mod 4) such that the multiplicative order of 2+-i modulo p in Gaussian integers (A385165) is odd.

Original entry on oeis.org

331, 571, 599, 691, 839, 971, 1051, 1171, 1291, 1451, 1571, 1879, 2131, 2411, 2971, 3251, 3331, 3491, 3571, 3691, 3851, 4051, 4091, 4211, 4651, 4679, 4691, 4919, 4931, 5051, 5171, 5479, 5531, 5651, 5839, 5851, 5879, 6011, 6599, 6679, 6691, 7079, 7211, 7331, 7691, 8011, 8039, 8171, 8731, 8839, 9011, 9371, 9811
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

Primes p == 3 (mod 4) are precisely the rational primes in the ring of Gaussian integers.
Let ord(a,m) be the multiplicative order of a modulo m. (Of course if a and m are integers, it doesn't matter if the base ring is Z or Z[i]). For a prime p == 3 (mod 4), we have that ord(2+-i,p) is divisible by ord(5,p), and that ord(2+-i,p) divides (p+1) * ord(5,p). What's more, ord(2+-i,p) divides (p^2-1)/2 if and only if 5 is a quadratic residue of integers modulo p. (See A385165).
As a result, if ord(2+-i,p) is not divisible by 8, then ord(5,p) is odd:
- Of course this is true if ord(2+-i,p) is odd.
- If ord(2+-i,p) == 2 (mod 4) and ord(5,p) is even, then ord(2+-i,p)/ord(5,p) is odd, and so ord(2+-i,p) divides ((p+1)/4) * ord(5,p), then ord(5,p) is odd. This implies that ord(2+-i,p) is odd, a contradiction.
- If ord(2+-i,p) == 4 (mod 8) and ord(5,p) is even (we have ord(5,p) == 2 (mod 4) since p == 3 (mod 4)), then ord(2+-i,p)/ord(5,p) == 2 (mod 4), and so ord(2+-i,p) divides ((p+1)/2) * ord(5,p), then ord(5,p) is odd. This implies that ord(2+-i,p) == 2 (mod 4), a contradiction.
From the above paragraph, this sequence is also primes p == 3 (mod 4) such that ord(2+-i,p)/ord(5,p) is odd.

Examples

			8731 is a term since (2+-i)^635253 == 1 (mod 8731), and 635253 is odd.
8839 is a term since (2+-i)^57447 == 1 (mod 8839), and 57447 is odd.
9011 is a term since (2+-i)^2029953 == 1 (mod 9011), and 2029953 is odd.
		

Crossrefs

Cf. A385165, A385179, A385192, A385217 (the actual multiplicative orders).
A385188 < this sequence < A385180 < A385167 < intersection of A122869 and A385168, where Ax < Ay means that Ax is a subsequence of Ay.

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)
    isA385169(p) = isprime(p) && p%4==3 && ord(p)%2

A385179 Primes p == 3 (mod 4) such that the multiplicative order of 2+-i modulo p in Gaussian integers (A385165) is congruent to 2 modulo 4.

Original entry on oeis.org

11, 131, 211, 251, 491, 811, 919, 1039, 1091, 1319, 1399, 1531, 1811, 1931, 2011, 2251, 2371, 2531, 2731, 2851, 3011, 3079, 3371, 3931, 4079, 4451, 4519, 4759, 5011, 5639, 6091, 6131, 6211, 6359, 6451, 6491, 6571, 6971, 7411, 7451, 7559, 7639, 8291, 8719, 8971, 9091, 9491, 9719, 9839, 9851, 9931
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

Primes p == 3 (mod 4) are precisely the rational primes in the ring of Gaussian integers.
Let ord(a,m) be the multiplicative order of a modulo m. (Of course if a and m are integers, it doesn't matter if the base ring is Z or Z[i]). For a prime p == 3 (mod 4), we have that ord(2+-i,p) is divisible by ord(5,p), and that ord(2+-i,p) divides (p+1) * ord(5,p). What's more, ord(2+-i,p) divides (p^2-1)/2 if and only if 5 is a quadratic residue of integers modulo p. (See A385165).
As a result, if ord(2+-i,p) is not divisible by 8, then ord(5,p) is odd:
- Of course this is true if ord(2+-i,p) is odd.
- If ord(2+-i,p) == 2 (mod 4) and ord(5,p) is even, then ord(2+-i,p)/ord(5,p) is odd, and so ord(2+-i,p) divides ((p+1)/4) * ord(5,p), then ord(5,p) is odd. This implies that ord(2+-i,p) is odd, a contradiction.
- If ord(2+-i,p) == 4 (mod 8) and ord(5,p) is even (we have ord(5,p) == 2 (mod 4) since p == 3 (mod 4)), then ord(2+-i,p)/ord(5,p) == 2 (mod 4), and so ord(2+-i,p) divides ((p+1)/2) * ord(5,p), then ord(5,p) is odd. This implies that ord(2+-i,p) == 2 (mod 4), a contradiction.
From the above paragraph, this sequence is also primes p == 3 (mod 4) such that ord(2+-i,p)/ord(5,p) == 2 (mod 4).

Examples

			919 is a term since (2+-i)^21114 == 1 (mod 919), (2+-i)^(21114/2) !== 1 (mod 919), and we have 21114 == 2 (mod 4).
		

Crossrefs

Cf. A385165, A385169, A385188, A385218 (the actual multiplicative orders).
Subsequence of A385167, which itself lies in the intersection of A122869 and A385168.

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)
    isA385179(p) = isprime(p) && p%4==3 && ord(p)%4==2

A385188 Primes p == 3 (mod 4) such that the multiplicative order of 2+-i modulo p in Gaussian integers (A385165) is not divisible by 2 or 3.

Original entry on oeis.org

599, 691, 1291, 1451, 2411, 3851, 4919, 5051, 5479, 5531, 5879, 6599, 7079, 7691, 8011, 8039, 11491, 13291, 14011, 15091, 15971, 16651, 17359, 18731, 19211, 19531, 20731, 22651, 23971, 24611, 25639, 25679, 26251, 32051, 32359, 32531, 32771, 32971, 35879, 37039, 37571, 38011, 38371
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

Primes p == 3 (mod 4) are precisely the rational primes in the ring of Gaussian integers.
5 is a quadratic residue of integers modulo p for p being a term of this sequence. (See A385165).

Examples

			5479 is a term since (2+-i)^125081 == 1 (mod 5479), and 125081 is divisible by neither 2 nor 3.
		

Crossrefs

Cf. A385165, A385179, A385219 (the actual multiplicative orders).
this sequence < A385169 < A385180 < A385167 < intersection of A122869 and A385168, where Ax < Ay means that Ax is a subsequence of Ay.
Also a subsequence of A385191.

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)
    isA385188(p) = isprime(p) && p%4==3 && ord(p)%2 && ord(p)%3

A385168 Primes p == 3 (mod 4) such that (p+1) * ord(5,p) / ord(2+-i,p) > 1. Here ord(a,m) is the multiplicative order of a modulo m.

Original entry on oeis.org

11, 79, 83, 131, 139, 191, 199, 211, 239, 251, 307, 331, 347, 359, 419, 439, 479, 491, 503, 571, 587, 599, 659, 691, 719, 811, 839, 863, 919, 947, 971, 1019, 1039, 1051, 1091, 1103, 1171, 1223, 1231, 1279, 1291, 1319, 1399, 1439, 1451, 1499, 1523, 1531, 1559, 1567, 1571, 1619, 1667, 1759
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

Of course if a and m are integers, it doesn't matter if the base ring is Z or Z[i] for ord(a,m).
List of p = A002145(k) such that A385166(k) > 1.
The smallest terms congruent to 1 or 4 modulo 5 that are not in A385167 are 139, 191, 419, 659, ...
The smallest terms congruent to 2 or 3 modulo 5 that are not in A384948 are 5683, 6287, 9463, 9923, ...

Crossrefs

Cf. A002145, A385165 (list of ord(2+-i,p)), A385166 (list of (p+1) * ord(5,p) / ord(2+-i,p)).
A384948 and A385167 (which contains A385180) are subsequences.

Programs

  • PARI
    quot(p) = my(z = znorder(Mod(5,p)), d = divisors((p+1)*z)); for(i=1, #d, if(Mod([2,-1;1,2],p)^d[i] == 1, return((p+1)*z/d[i]))) \\ for a prime p == 3 (mod 4), returns (p+1) * ord(5,p) / ord(2+-i, p)
    isA385168(p) = isprime(p) && p%4==3 && quot(p) > 1

Formula

139 is a term since the multiplicative order of 2+-i modulo 139 is 1932, and (140*ord(5,139))/1932 = 5 > 1.
5683 is a term since the multiplicative order of 2+-i modulo 5683 is 1537928, and (5684*ord(5,5683))/1537928 = 7 > 1.

A385167 Primes p == 3 (mod 4) such that (p+1) * ord(5,p) / ord(2+-i,p) is even. Here ord(a,m) is the multiplicative order of a modulo m.

Original entry on oeis.org

11, 79, 131, 199, 211, 239, 251, 331, 359, 439, 479, 491, 571, 599, 691, 719, 811, 839, 919, 971, 1039, 1051, 1091, 1171, 1279, 1291, 1319, 1399, 1439, 1451, 1531, 1559, 1571, 1759, 1811, 1879, 1931, 1999, 2011, 2039, 2131, 2239, 2251, 2371, 2399, 2411, 2531, 2719, 2731, 2851, 2879, 2971, 2999
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

Of course if a and m are integers, it doesn't matter if the base ring is Z or Z[i] for ord(a,m).
List of p = A002145(k) such that A385166(k) is even.
Since in this case d(p) divides (p^2-1)/2, 5 must be a quadratic residue modulo p (see A385165).

Examples

			359 is a term since the multiplicative order of 2+-i modulo 359 is 6444, and (360*ord(5,359))/6444 = 10 is even.
		

Crossrefs

Cf. A002145, A385165 (list of ord(2+-i,p)), A385166 (list of (p+1) * ord(5,p) / ord(2+-i,p)).
Subsequence of the intersection of A122869 and A385168. Contains A385180 as a subsequence.

Programs

  • PARI
    quot(p) = my(z = znorder(Mod(5,p)), d = divisors((p+1)*z)); for(i=1, #d, if(Mod([2,-1;1,2],p)^d[i] == 1, return((p+1)*z/d[i]))) \\ for a prime p == 3 (mod 4), returns (p+1) * ord(5,p) / ord(2+-i, p)
    isA385167(p) = isprime(p) && p%4==3 && quot(p)%2==0

A385180 Primes p == 3 (mod 4) such that (p+1) * ord(5,p) / ord(2+-i,p) is divisible by 4. Here ord(a,m) is the multiplicative order of a modulo m.

Original entry on oeis.org

331, 571, 599, 691, 839, 919, 971, 1039, 1051, 1171, 1279, 1291, 1319, 1399, 1439, 1451, 1571, 1759, 1879, 2131, 2411, 2879, 2971, 3079, 3251, 3331, 3491, 3571, 3691, 3851, 4051, 4079, 4091, 4211, 4519, 4639, 4651, 4679, 4691, 4759, 4919, 4931, 5051, 5119, 5171, 5279, 5479, 5519, 5531
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

Of course if a and m are integers, it doesn't matter if the base ring is Z or Z[i] for ord(a,m).
List of p = A002145(k) such that A385166(k) is divisible by 4.
Since in this case d(p) divides (p^2-1)/2, 5 must be a quadratic residue modulo p (see A385165).
By definition, a term that is in neither A385169 nor A385179 must be congruent to 31 or 79 modulo 80. The smallest such term is p = 1759 (ord(2+-i,p) = ((p+1)/4) * ord(5,p) = 128920); even if 1039 == 79 (mod 80), we have ord(2+-i,p) = ((p+1)/8) * ord(5,p) = 22490 == 2 (mod 4), which means that 1039 is in A385179.

Examples

			571 is a term since the multiplicative order of 2+-i modulo 571 is 40755, and (572*ord(5,571))/40755 = 4 is divisible by 4.
		

Crossrefs

Cf. A002145, A385165 (list of ord(2+-i,p)), A385166 (list of (p+1) * ord(5,p) / ord(2+-i,p)).
Subsequence of A385167, which is itself a subsequence of intersection of A122869 and A385168.

Programs

  • PARI
    quot(p) = my(z = znorder(Mod(5,p)), d = divisors((p+1)*z)); for(i=1, #d, if(Mod([2,-1;1,2],p)^d[i] == 1, return((p+1)*z/d[i]))) \\ for a prime p == 3 (mod 4), returns (p+1) * ord(5,p) / ord(2+-i, p)
    isA385180(p) = isprime(p) && p%4==3 && quot(p)%4==0

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)), ", ")))

A385217 Odd multiplicative orders of 2+-i modulo primes p == 3 (mod 4).

Original entry on oeis.org

13695, 40755, 7475, 19895, 43995, 117855, 138075, 13185, 69445, 87725, 308505, 220665, 567645, 80735, 1103355, 1321125, 1386945, 507795, 1594005, 130995, 205975, 2051325, 2092035, 2216565, 2703975, 1368315, 2750685, 504095, 3039345, 212605, 3342405, 125081, 1274665, 3991725, 152205, 4279275
Offset: 1

Views

Author

Jianing Song, Jun 22 2025

Keywords

Comments

Primes p == 3 (mod 4) are precisely the rational primes in the ring of Gaussian integers.
Odd elements in A385165.
By definition, a(n) is the multiplicative order of 2+-i modulo A385169(n).

Examples

			a(49) = 635253 since it is the multiplicative order of 5 modulo A385169(49) = 8731, and it is odd.
a(50) = 57447 since it is the multiplicative order of 5 modulo A385169(50) = 8839, and it is odd.
a(51) = 2029953 since it is the multiplicative order of 5 modulo A385169(51) = 9011, and it is odd.
		

Crossrefs

Cf. A385165, A385169 (corresponding primes), A385218, A385219.

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, 1e4, if(p%4==3 && ord(p)%2, print1(ord(p), ", ")))

A385218 Multiplicative orders of 2+-i modulo p == 3 (mod 4) that are congruent to 2 modulo 4.

Original entry on oeis.org

30, 4290, 3710, 3150, 20090, 164430, 21114, 22490, 59514, 43494, 244650, 65110, 819930, 932190, 1011030, 1266750, 1405410, 533830, 1864590, 135470, 2266530, 79002, 946970, 3863190, 1039890, 4952850, 170178, 566202, 6277530, 1324930, 3091690, 9397290, 214314, 5054610, 3467950, 3511090
Offset: 1

Views

Author

Jianing Song, Jun 22 2025

Keywords

Comments

Primes p == 3 (mod 4) are precisely the rational primes in the ring of Gaussian integers.
Elements in A385165 that are congruent to 2 modulo 4.
By definition, a(n) is the multiplicative order of 2+-i modulo A385179(n).

Examples

			a(7) = 21114 since it is the multiplicative order of 5 modulo A385179(7) = 919, and it is congruent to 2 modulo 4.
		

Crossrefs

Cf. A385165, A385179 (corresponding primes), A385217, A385219.

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, 1e4, if(p%4==3 && ord(p)%4==2, print1(ord(p), ", ")))
Showing 1-10 of 14 results. Next