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-8 of 8 results.

A019334 Primes with primitive root 3.

Original entry on oeis.org

2, 5, 7, 17, 19, 29, 31, 43, 53, 79, 89, 101, 113, 127, 137, 139, 149, 163, 173, 197, 199, 211, 223, 233, 257, 269, 281, 283, 293, 317, 331, 353, 379, 389, 401, 449, 461, 463, 487, 509, 521, 557, 569, 571, 593, 607, 617, 631, 641, 653, 677, 691, 701, 739, 751, 773, 797
Offset: 1

Views

Author

Keywords

Comments

To allow primes less than the specified primitive root m (here, 3) to be included, we use the essentially equivalent definition "Primes p such that the multiplicative order of m mod p is p-1". This comment applies to all of A019334-A019421. - N. J. A. Sloane, Dec 02 2019
From Jianing Song, Apr 27 2019: (Start)
All terms except the first are congruent to 5 or 7 modulo 12. If we define
Pi(N,b) = # {p prime, p <= N, p == b (mod 12)};
Q(N) = # {p prime, 2 < p <= N, p in this sequence},
then by Artin's conjecture, Q(N) ~ C*N/log(N) ~ 2*C*(Pi(N,5) + Pi(N,7)), where C = A005596 is Artin's constant.
If we further define
Q(N,b) = # {p prime, p <= N, p == b (mod 12), p in this sequence},
then we have:
Q(N,5) ~ (3/5)*Q(N) ~ (12/5)*C*Pi(N,5);
Q(N,7) ~ (2/5)*Q(N) ~ ( 8/5)*C*Pi(N,7).
For example, for the first 1000 terms except for a(1) = 2, there are 593 terms == 5 (mod 12) and 406 terms == 7 (mod 12). (End)

Crossrefs

Cf. A005596, A001122 (primitive root 2).

Programs

  • Mathematica
    pr=3; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &]
  • PARI
    isok(p) = isprime(p) && (p!=3) && (znorder(Mod(3, p))+1 == p); \\ Michel Marcus, May 12 2019

A019335 Primes with primitive root 5.

Original entry on oeis.org

2, 3, 7, 17, 23, 37, 43, 47, 53, 73, 83, 97, 103, 107, 113, 137, 157, 167, 173, 193, 197, 223, 227, 233, 257, 263, 277, 283, 293, 307, 317, 347, 353, 373, 383, 397, 433, 443, 463, 467, 503, 523, 547, 557, 563, 577, 587, 593, 607, 613, 617, 647, 653, 673, 677, 683, 727
Offset: 1

Views

Author

Keywords

Comments

To allow primes less than the specified primitive root m (here, 5) to be included, we use the essentially equivalent definition "Primes p such that the multiplicative order of m mod p is p-1". This comment applies to all of A019334-A019421. - N. J. A. Sloane, Dec 02 2019
Appears to be the numbers k such that the sequence 5^n mod k has period length k-1. All terms are congruent to 2 or 3 mod 5. - Gary Detlefs, May 21 2014
From Jianing Song, Apr 27 2019: (Start)
If we define
Pi(N,b) = # {p prime, p <= N, p == b (mod 5)};
Q(N) = # {p prime, p <= N, p in this sequence},
then by Artin's conjecture, Q(N) ~ (20/19)*C*N/log(N) ~ (40/19)*C*(Pi(N,2) + Pi(N,3)), where C = A005596 is Artin's constant.
Conjecture: if we further define
Q(N,b) = # {p prime, p <= N, p == b (mod 5), p in this sequence},
then we have:
Q(N,2) ~ (1/2)*Q(N) ~ (20/19)*C*Pi(N,2);
Q(N,3) ~ (1/2)*Q(N) ~ (20/19)*C*Pi(N,3). (End)

Crossrefs

Programs

  • Mathematica
    pr=5; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &]
  • PARI
    isok(p) = isprime(p) && (p != 5) && (znorder(Mod(5, p)) == p-1); \\ Michel Marcus, Apr 27 2019

A019337 Primes with primitive root 7.

Original entry on oeis.org

2, 5, 11, 13, 17, 23, 41, 61, 67, 71, 79, 89, 97, 101, 107, 127, 151, 163, 173, 179, 211, 229, 239, 241, 257, 263, 269, 293, 347, 349, 359, 379, 397, 431, 433, 443, 461, 491, 499, 509, 521, 547, 577, 593, 599, 601, 631, 659, 677, 683, 733, 739, 743, 761, 773, 797, 823
Offset: 1

Views

Author

Keywords

Comments

To allow primes less than the specified primitive root m (here, 7) to be included, we use the essentially equivalent definition "Primes p such that the multiplicative order of m mod p is p-1". This comment applies to all of A019334-A019421. - N. J. A. Sloane, Dec 03 2019
All terms apart from the first are == 5, 11, 13, 15, 17, 23 (mod 28) since 7 is a quadratic residue modulo any other prime. By Artin's conjecture, this sequence contains about 37.395% of all primes, that is, about 74.79% of all primes == 5, 11, 13, 15, 17, 23 (mod 28). - Jianing Song, Sep 05 2018

Crossrefs

Cf. A167795.

Programs

  • Mathematica
    pr=7; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &]

A019339 Primes with primitive root 11.

Original entry on oeis.org

2, 3, 13, 17, 23, 29, 31, 41, 47, 59, 67, 71, 73, 101, 103, 109, 149, 163, 173, 179, 197, 223, 233, 251, 277, 281, 293, 331, 367, 373, 383, 419, 443, 461, 463, 467, 487, 499, 557, 569, 587, 593, 599, 601, 613, 619, 643, 647, 673, 677, 683, 701, 719, 761, 769, 809, 821
Offset: 1

Views

Author

Keywords

Comments

To allow primes less than the specified primitive root m (here, 11) to be included, we use the essentially equivalent definition "Primes p such that the multiplicative order of m mod p is p-1". This comment applies to all of A019334-A019421. - N. J. A. Sloane, Dec 03 2019
This is a subsequence of A038882. - Klaus Purath, Jul 03 2023

Crossrefs

Cf. A071566.

Programs

  • Mathematica
    pr=11; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &]

A019338 Primes with primitive root 8.

Original entry on oeis.org

3, 5, 11, 29, 53, 59, 83, 101, 107, 131, 149, 173, 179, 197, 227, 269, 293, 317, 347, 389, 419, 443, 461, 467, 491, 509, 557, 563, 587, 653, 659, 677, 701, 773, 797, 821, 827, 941, 947, 1019, 1061, 1091, 1109, 1187, 1229, 1259, 1277, 1283, 1301, 1307, 1373, 1427
Offset: 1

Views

Author

Keywords

Comments

To allow primes less than the specified primitive root m (here, 8) to be included, we use the essentially equivalent definition "Primes p such that the multiplicative order of m mod p is p-1". This comment applies to all of A019334-A019421. - N. J. A. Sloane, Dec 03 2019
Members of A001122 that are not congruent to 1 mod 3. - Robert Israel, Aug 12 2014
Terms greater than 3 are congruent to 5 or 11 modulo 24. - Jianing Song, May 12 2024 [Corrected on May 13 2025]

Programs

  • Maple
    select(t -> isprime(t) and numtheory:-order(8,t) = t-1, [2*i+1 $ i=1..1000]); # Robert Israel, Aug 12 2014
  • Mathematica
    pr=8; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &] (* N. J. A. Sloane, Jun 01 2010 *)
    a[p_, q_]:=Sum[2 Cos[2^n Pi/((2 q+1)(2 p+1))],{n,1,2 q p}]
    2 Select[Range[800],Rationalize[N[a[#, 3],20]]==1 &]+1
    (* Gerry Martens, Apr 28 2015 *)
    Join[{3,5},Select[Prime[Range[250]],PrimitiveRoot[#,8]==8&]] (* Harvey P. Dale, Aug 10 2019 *)
  • PARI
    is(n)=isprime(n) && n>2 && znorder(Mod(8,n))==n-1 \\ Charles R Greathouse IV, May 21 2015

Formula

Let a(p,q)=sum(n=1,2*p*q,2*cos(2^n*Pi/((2*q+1)*(2*p+1)))). Then 2*p+1 is a prime of this sequence when a(p,3)==1. - Gerry Martens, May 15 2015
On Artin's conjecture, a(n) ~ (5/3A) n log n, where A = A005596 is Artin's constant. - Charles R Greathouse IV, May 21 2015

A056619 Smallest prime with primitive root n, or 0 if no such prime exists.

Original entry on oeis.org

2, 3, 2, 0, 2, 11, 2, 3, 2, 7, 2, 5, 2, 3, 2, 0, 2, 5, 2, 3, 2, 5, 2, 7, 2, 3, 2, 5, 2, 11, 2, 3, 2, 19, 2, 0, 2, 3, 2, 7, 2, 5, 2, 3, 2, 11, 2, 5, 2, 3, 2, 5, 2, 7, 2, 3, 2, 5, 2, 19, 2, 3, 2, 0, 2, 7, 2, 3, 2, 19, 2, 5, 2, 3, 2, 13, 2, 5, 2, 3, 2, 5, 2, 11, 2, 3, 2, 5, 2, 11, 2, 3, 2, 7, 2, 7, 2, 3, 2
Offset: 1

Views

Author

Robert G. Wilson v, Aug 07 2000

Keywords

Comments

a(n) > n/2 for n in { 2, 6, 10, 34 }. Are there any other such indices n? - M. F. Hasler, Feb 21 2017

Crossrefs

Here the primitive root may be larger than the prime, whereas in A023049 it may not be.

Programs

  • Maple
    f:= proc(n) local p;
       if n::odd then return 2
       elif issqr(n) then return 0
       fi;
       p:= 3;
       do
          if numtheory:-order(n,p) = p-1 then return p fi;
          p:= nextprime(p);
       od
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 21 2017
  • Mathematica
    a[n_] := Module[{p}, If[OddQ[n], Return[2], If[IntegerQ[Sqrt[n]], Return[0], p = 3; While[True, If[MultiplicativeOrder[n, p] == p-1, Return[p]]; p = NextPrime[p]]]]];
    Array[a, 100] (* Jean-François Alcover, Apr 10 2019, after Robert Israel *)
  • PARI
    A056619(n)=forprime(p=2,n*2,gcd(n,p)==1&&znorder(Mod(n,p))==p-1&&return(p)) \\ or, more efficient:
    A056619(n)=if(bittest(n,0),2,!issquare(n)&&forprime(p=3,n*2,gcd(n,p)==1&&znorder(Mod(n,p))==p-1&&return(p))) \\ M. F. Hasler, Feb 21 2017

Formula

a(n) = 0 only for perfect squares, A000290.
a(n) = 2 for all odd n. a(n) = 0 for even squares. a(n) = 3 for n = 2 (mod 6). a(n) = 5 for n in {12, 18, 22, 28} (mod 30). - M. F. Hasler, Feb 21 2017

Extensions

Corrected and extended by Jud McCranie, Mar 21 2002
Corrected by Robert Israel, Feb 21 2017

A019336 Primes with primitive root 6.

Original entry on oeis.org

11, 13, 17, 41, 59, 61, 79, 83, 89, 103, 107, 109, 113, 127, 131, 137, 151, 157, 179, 199, 223, 227, 229, 233, 251, 257, 271, 277, 347, 367, 373, 397, 401, 419, 443, 449, 467, 487, 491, 521, 563, 569, 587, 593, 613, 641, 659, 661, 683, 709, 733, 757, 761, 809, 823, 827
Offset: 1

Views

Author

Keywords

Comments

To allow primes less than the specified primitive root m (here, 6) to be included, we use the essentially equivalent definition "Primes p such that the multiplicative order of m mod p is p-1". This comment applies to all of A019334-A019421. - N. J. A. Sloane, Dec 03 2019

Programs

  • Mathematica
    pr=6; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &]

A019340 Primes with primitive root 12.

Original entry on oeis.org

5, 7, 17, 31, 41, 43, 53, 67, 101, 103, 113, 127, 137, 139, 149, 151, 163, 173, 197, 223, 257, 269, 281, 283, 293, 317, 353, 367, 379, 389, 401, 449, 461, 509, 523, 547, 557, 569, 571, 593, 607, 617, 619, 631, 641, 653, 691, 701, 739, 751, 761, 773, 787, 797, 809, 821
Offset: 1

Views

Author

Keywords

Comments

To allow primes less than the specified primitive root m (here, 12) to be included, we use the essentially equivalent definition "Primes p such that the multiplicative order of m mod p is p-1". This comment applies to all of A019334-A019421. - N. J. A. Sloane, Dec 03 2019

Programs

  • Mathematica
    pr=12; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &]
Showing 1-8 of 8 results.