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 10 results.

A014663 Primes p such that multiplicative order of 2 modulo p is odd.

Original entry on oeis.org

7, 23, 31, 47, 71, 73, 79, 89, 103, 127, 151, 167, 191, 199, 223, 233, 239, 263, 271, 311, 337, 359, 367, 383, 431, 439, 463, 479, 487, 503, 599, 601, 607, 631, 647, 719, 727, 743, 751, 823, 839, 863, 881, 887, 911, 919, 937, 967, 983, 991, 1031, 1039, 1063
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Or, primes p which do not divide 2^n+1 for any n.
The possibility n=0 in the above rules out A072936(1)=2; apart from this, a(n)=A072936(n+1). - M. F. Hasler, Dec 08 2007
The order of 2 mod p is odd iff 2^k=1 mod p, where p-1=2^s*k, k odd. - M. F. Hasler, Dec 08 2007
Has density 7/24 (Hasse).
From Jianing Song, Jun 27 2025: (Start)
The multiplicative order of 2 modulo a(n) is A139686(n).
Contained in primes congruent to 1 or 7 modulo 8 (primes p such that 2 is a quadratic residue modulo p, A001132), and contains primes congruent to 7 modulo 8 (A007522). (End)

References

  • Christopher Adler and Jean-Paul Allouche (2022), Finite self-similar sequences, permutation cycles, and music composition, Journal of Mathematics and the Arts, 16:3, 244-261, DOI: 10.1080/17513472.2022.2116745.
  • P. Moree, Appendix to V. Pless et al., Cyclic Self-Dual Z_4 Codes, Finite Fields Applic., vol. 3 pp. 48-69, 1997.

Crossrefs

Cf. Complement in primes of A091317.
Cf. A001132, A007522, A040098, A045315, A049564, A139686 (the actual multiplicative orders).
Cf. Essentially the same as A072936 (except for missing leading term 2).
Cf. other bases: this sequence (base 2), A385220 (base 3), A385221 (base 4), A385192 (base 5), A163183 (base -2), A385223 (base -3), A385224 (base -4), A385225 (base -5).

Programs

  • Mathematica
    okQ[p_] := OddQ[MultiplicativeOrder[2, p]];
    Select[Prime[Range[1000]], okQ] (* Jean-François Alcover, Nov 23 2024 *)
  • PARI
    isA014663(p)=1==Mod(1,p)<<((p-1)>>factor(p-1,2)[1,2])
    listA014663(N=1000)=forprime(p=3,N,isA014663(p)&print1(p", ")) \\ M. F. Hasler, Dec 08 2007
    
  • PARI
    lista(nn) = {forprime(p=3, nn, if (znorder(Mod(2, p)) % 2, print1(p, ", ")););} \\ Michel Marcus, Feb 06 2015

Extensions

Edited by M. F. Hasler, Dec 08 2007
More terms from Max Alekseyev, Feb 06 2010

A163183 Primes dividing 2^j + 1 for some odd j.

Original entry on oeis.org

3, 11, 19, 43, 59, 67, 83, 107, 131, 139, 163, 179, 211, 227, 251, 281, 283, 307, 331, 347, 379, 419, 443, 467, 491, 499, 523, 547, 563, 571, 587, 617, 619, 643, 659, 683, 691, 739, 787, 811, 827, 859, 883, 907, 947, 971, 1019, 1033, 1049, 1051, 1091, 1097
Offset: 1

Views

Author

Christopher J. Smyth, Jul 22 2009

Keywords

Comments

Also the primes p for which ord_p(-2) is odd, as (-2)^j == 1 (mod p).
All such p are = 1 or 3 mod 8, so sequence is subsequence of A033200, as (-2)^{j+1} == -2 (mod p) implies that (-2/p) = 1, p == 1 or 3 (mod 8).
Claim: Sequence contains all primes = 3 mod 8, so contains A007520 as a subsequence.
Proof: If p = 8r + 3 then 2^{4r+1} == 1 or -1 (mod p). If former, then (2^{2r+1})^2 == 2 (mod p), (2/p) = 1, only true for p == 1 or 7 (mod 8). So p | 2^{4r+1} + 1.
Also contains some primes == 1 (mod 8), given in A163184. So sequence is a union of A007520 and A163184.
Claim: For every p in sequence and every 2^k, the equation x^{2^k} == -2 (mod p) is soluble. Hence sequence is a subsequence of A033203 (k=1), A051071 (k=2), A051073 (k=3), A051077 (k=4), A051085 (k=5), A051101 (k=6), ....
Proof: Put x == (-2)^u (mod p). Then using (-2)^j == 1 (mod p), we can solve x^{2^k} == -2 (mod p) if can find u and v such that u*2^k + v*j = 1, possible as gcd(2^k, j) = 1.
From Jianing Song, Jun 22 2025: (Start)
The multiplicative order of -2 modulo a(n) is A385228(n).
Contained in primes congruent to 1 or 3 modulo 8 (primes p such that -2 is a quadratic residue modulo p, A033200), and contains primes congruent to 3 modulo 8 (A007520).
Conjecture: this sequence has density 7/24 among the primes (see A014663). (End)

Examples

			11 is in sequence as 11 | 2^5 + 1; 281 (smallest element of the sequence == 1 (mod 8)) is in the sequence as 281 | 2^35 + 1.
		

Crossrefs

Sequence is a union of A007520 and A163184.
Subsequence of A033200. Contains A007520 as a subsequence.
Cf. A385228 (the actual multiplicative orders).
Cf. other bases: A014663 (base 2), A385220 (base 3), A385221 (base 4), A385192 (base 5), this sequence (base -2), A385223 (base -3), A385224 (base -4), A385225 (base -5).

Programs

  • Maple
    with(numtheory):A:=3:p:=3: for c to 500 do p:=nextprime(p);if order(-2,p) mod 2=1 then A:=A,p;;fi;od:A;
  • Mathematica
    Select[Prime[Range[200]], OddQ[MultiplicativeOrder[-2, #]] &] (* Paolo Xausa, Jun 30 2025 *)
  • PARI
    lista(nn) = forprime(p=3, nn, if(znorder(Mod(-2, p))%2, print1(p, ", "))); \\ Jinyuan Wang, Mar 23 2020

A385220 Primes p such that multiplicative order of 3 modulo p is odd.

Original entry on oeis.org

2, 11, 13, 23, 47, 59, 71, 83, 107, 109, 131, 167, 179, 181, 191, 227, 229, 239, 251, 263, 277, 311, 313, 347, 359, 383, 419, 421, 431, 433, 443, 467, 479, 491, 503, 541, 563, 587, 599, 601, 647, 659, 683, 709, 719, 733, 743, 757, 827, 829, 839, 863, 887, 911, 947, 971, 983
Offset: 1

Views

Author

Jianing Song, Jun 22 2025

Keywords

Comments

The multiplicative order of 3 modulo a(n) is A385226(n).
Without 2, contained in primes congruent to 1 or 11 modulo 12 (primes p such that 3 is a quadratic residue modulo p; A097933), and contains primes congruent to 11 modulo 12 (A068231).
Conjecture: this sequence has density 1/3 among the primes.

Crossrefs

A068231 < this sequence < A045317 < A040101 < A097933 (ignoring terms 2, 3), where Ax < Ay means that Ax is a subsequence of Ay.
Complement of A301916 in {primes} \ {3}.
Cf. A385226 (the actual multiplicative orders).
Cf. other bases: A014663 (base 2), this sequence (base 3), A385221 (base 4), A385192 (base 5), A163183 (base -2), A385223 (base -3), A385224 (base -4), A385225 (base -5).

Programs

  • Mathematica
    Select[Prime[Range[200]], OddQ[MultiplicativeOrder[3, #]] &] (* Paolo Xausa, Jun 28 2025 *)
  • PARI
    isA385220(p) = isprime(p) && (p!=3) && znorder(Mod(3,p))%2

A385224 Primes p such that multiplicative order of -4 modulo p is odd.

Original entry on oeis.org

5, 13, 29, 37, 41, 53, 61, 101, 109, 113, 137, 149, 157, 173, 181, 197, 229, 269, 277, 293, 313, 317, 349, 373, 389, 397, 409, 421, 457, 461, 509, 521, 541, 557, 569, 593, 613, 653, 661, 677, 701, 709, 733, 757, 761, 773, 797, 809, 821, 829, 853, 857, 877, 941, 953, 997
Offset: 1

Views

Author

Jianing Song, Jun 22 2025

Keywords

Comments

The multiplicative order of -4 modulo a(n) is A385230(n).
Different from A133204: 593 is here but not in A133204, and 1601 is in A133204 but not here.
The sequence contains no primes congruent to 3 modulo 4 and all primes congruent to 5 modulo 8:
- If p is a term of this sequence, then -4 is a quadratic residue modulo p, so p == 1 (mod 4);
- For p == 1 (mod 4), we have (-4)^((p-1)/4) == (+-1+-i)^(p-1) == 1 (mod p), where i is a solution to i^2 == -1 (mod p).
Conjecture: this sequence has density 1/3 among the primes.

Crossrefs

Subsequence of A002144 (primes congruent to 1 modulo 4).
Contains A007521 (primes congruent to 5 or modulo 8) as a proper subsequence.
Cf. A385230 (the actual multiplicative orders).
Cf. other bases: A014663 (base 2), A385220 (base 3), A385221 (base 4), A385192 (base 5), A163183 (base -2), A385223 (base -3), this sequence (base -4), A385225 (base -5).
Cf. A133204.

Programs

  • Mathematica
    Select[Prime[Range[200]], OddQ[MultiplicativeOrder[-4, #]] &] (* Paolo Xausa, Jun 28 2025 *)
  • PARI
    isA385224(p) = isprime(p) && (p!=2) && znorder(Mod(-4,p))%2

A385193 Odd multiplicative orders of 5 modulo primes.

Original entry on oeis.org

1, 5, 9, 3, 29, 5, 39, 25, 27, 65, 69, 37, 75, 89, 15, 19, 33, 35, 119, 25, 67, 27, 155, 165, 179, 21, 97, 25, 17, 209, 215, 219, 115, 239, 245, 249, 135, 71, 285, 299, 309, 35, 329, 115, 359, 123, 375, 405, 9, 419, 429, 455, 459, 235, 485, 495, 509, 255, 515, 173, 525, 265, 267, 109, 575, 45
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

a(n) is the multiplicative order of 5 modulo A385192(n).
Odd elements in A211241.

Examples

			a(8) = 25 since it is the multiplicative order of 5 modulo A385192(8) = 101, and it is odd.
		

Crossrefs

Cf. A211241, A385192 (corresponding primes).
Cf. other bases: A139686 (base 2), A385226 (base 3), A385227 (base 4), this sequence (base 5), A385228 (base -2), A385229 (base -3), A385230 (base -4), A385231 (base -5).

Programs

  • Mathematica
    Select[Map[MultiplicativeOrder[5, #] &, Prime[Range[200]]], OddQ] (* Paolo Xausa, Jun 28 2025 *)
  • PARI
    forprime(p=2, 1e4, if(p!=5, z=znorder(Mod(5, p)); if(z%2, print1(z, ", "))))

A385221 Primes p such that multiplicative order of 4 modulo p is odd.

Original entry on oeis.org

3, 7, 11, 19, 23, 31, 43, 47, 59, 67, 71, 73, 79, 83, 89, 103, 107, 127, 131, 139, 151, 163, 167, 179, 191, 199, 211, 223, 227, 233, 239, 251, 263, 271, 281, 283, 307, 311, 331, 337, 347, 359, 367, 379, 383, 419, 431, 439, 443, 463, 467, 479, 487, 491, 499, 503, 523, 547, 563
Offset: 1

Views

Author

Jianing Song, Jun 22 2025

Keywords

Comments

The multiplicative order of 4 modulo a(n) is A385227(n).
Primes p such that neither ord(2,p) nor ord(-2,p) is divisible by 4, where ord(a,m) is the multiplicative order of a modulo m. (Note that we have either (a) ord(2,p) = ord(-2,p) and both are even; (b) ord(-2,p) = 2*ord(2,p), ord(2,p) is odd, ord(-2,p) == 2 (mod 4); or (c) ord(2,p) = 2*ord(-2,p), ord(-2,p) is odd, ord(2,p) == 2 (mod 4)).
Contains all primes congruent to 3 modulo 4 (A002145).
Conjecture: this sequence has density 7/12 among the primes (see A014663).

Crossrefs

Contains A002145, A014663, and A163183.
Cf. A385227 (the actual multiplicative orders).
Cf. other bases: A014663 (base 2), A385220 (base 3), this sequence (base 4), A385192 (base 5), A163183 (base -2), A385223 (base -3), A385224 (base -4), A385225 (base -5).

Programs

  • Mathematica
    Select[Prime[Range[200]], OddQ[MultiplicativeOrder[4, #]] &] (* Paolo Xausa, Jun 28 2025 *)
  • PARI
    isA385221(p) = isprime(p) && (p!=2) && znorder(Mod(4,p))%2

A385223 Primes p such that multiplicative order of -3 modulo p is odd.

Original entry on oeis.org

2, 7, 19, 31, 37, 43, 61, 67, 79, 103, 127, 139, 151, 157, 163, 199, 211, 223, 271, 283, 307, 331, 349, 367, 373, 379, 397, 439, 463, 487, 499, 523, 547, 571, 607, 613, 619, 631, 643, 661, 691, 727, 739, 751, 787, 811, 823, 853, 859, 877, 883, 907, 919, 937, 967, 991, 997
Offset: 1

Views

Author

Jianing Song, Jun 22 2025

Keywords

Comments

The multiplicative order of -3 modulo a(n) is A385229(n).
Without 2, contained in primes congruent to 1 modulo 3 (primes p such that -3 is a quadratic residue modulo p, A002476), and contains primes congruent to 7 modulo 12 (A068229).
Conjecture: this sequence has density 1/3 among the primes.

Crossrefs

Subsequence of A002476. Contains A068229 as a subsequence.
Cf. A385229 (the actual multiplicative orders).
Cf. other bases: A014663 (base 2), A385220 (base 3), A385221 (base 4), A385192 (base 5), A163183 (base -2), this sequence (base -3), A385224 (base -4), A385225 (base -5).

Programs

  • Mathematica
    Select[Prime[Range[200]], OddQ[MultiplicativeOrder[-3, #]] &] (* Paolo Xausa, Jun 28 2025 *)
  • PARI
    isA385223(p) = isprime(p) && (p!=3) && znorder(Mod(-3,p))%2

A385225 Primes p such that multiplicative order of -5 modulo p is odd.

Original entry on oeis.org

2, 3, 7, 23, 29, 43, 47, 61, 67, 83, 103, 107, 127, 163, 167, 223, 227, 229, 263, 283, 307, 347, 349, 367, 383, 421, 443, 449, 463, 467, 487, 503, 509, 521, 523, 547, 563, 587, 607, 643, 647, 661, 683, 701, 709, 727, 743, 761, 787, 821, 823, 827, 863, 883, 887, 907, 947, 967, 983
Offset: 1

Views

Author

Jianing Song, Jun 22 2025

Keywords

Comments

The multiplicative order of -5 modulo a(n) is A385231(n).
Contained in primes congruent to 1, 3, 7, 9 modulo 20 (primes p such that -5 is a quadratic residue modulo p, A139513), and contains primes congruent to 3, 7 modulo 20 (A122870).
Conjecture: this sequence has density 1/3 among the primes.

Crossrefs

Subsequence of A139513. Contains A122870 as a subsequence.
Cf. A385231 (the actual multiplicative orders).
Cf. other bases: A014663 (base 2), A385220 (base 3), A385221 (base 4), A385192 (base 5), A163183 (base -2), A385223 (base -3), A385224 (base -4), this sequence (base -5).

Programs

  • Mathematica
    Select[Prime[Range[200]], OddQ[MultiplicativeOrder[-5, #]] &] (* Paolo Xausa, Jun 28 2025 *)
  • PARI
    isA385225(p) = isprime(p) && (p!=5) && znorder(Mod(-5,p))%2

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

A040105 Primes p such that x^4 = 5 has a solution mod p.

Original entry on oeis.org

2, 5, 11, 19, 31, 59, 71, 79, 101, 109, 131, 139, 149, 151, 179, 181, 191, 199, 211, 239, 251, 269, 271, 311, 331, 359, 379, 389, 401, 409, 419, 431, 439, 449, 461, 479, 491, 499, 521, 541, 569, 571, 599, 619
Offset: 1

Views

Author

Keywords

Comments

Union of 2, 5, A122869 (primes congruent to 11 or 19 modulo 20), and primes p == 1 (mod 4) such that 5^((p-1)/4) == 1 (mod p). - Jianing Song, Jun 20 2025

Crossrefs

Apart from 2 and 5, subsequence of A045468.
A385192 (which itself contains A122869) is a proper subsequence.

Programs

  • Magma
    [p: p in PrimesUpTo(800) | exists(t){x : x in ResidueClassRing(p) | x^4 eq 5}]; // Vincenzo Librandi, Sep 11 2012
    
  • Mathematica
    ok [p_]:=Reduce[Mod[x^4- 5, p] == 0, x, Integers] =!= False;  Select[Prime[Range[200]], ok] (* Vincenzo Librandi, Sep 11 2012 *)
  • PARI
    isA040105(p) = isprime(p) && (p==2 || p==5 || p%20==11 || p%20==19 || (p%4==1 && Mod(5,p)^((p-1)/4) == 1)) \\ Jianing Song, Jun 20 2025
Showing 1-10 of 10 results.