OFFSET
1,1
COMMENTS
Artin conjectured that this sequence is infinite.
Conjecture: sequence contains infinitely many pairs of twin primes. - Benoit Cloitre, May 08 2003
Pieter Moree writes (Oct 20 2004): Assuming the Generalized Riemann Hypothesis, it can be shown that the density of primes p such that a prescribed integer g has order (p-1)/t, with t fixed, exists and, moreover, it can be computed. This density will be a rational number times the so-called Artin constant. For 2 and 10 the density of primitive roots is A, the Artin constant itself.
It seems that this sequence consists of A050229 \ {1,2}.
Primes p such that 1/p, when written in base 2, has period p-1, which is the greatest period possible for any integer.
Positive integer 2*m-1 is in the sequence iff A179382(m)=m-1. - Vladimir Shevelev, Jul 14 2010
These are the odd primes p for which the polynomial 1+x+x^2+...+x^(p-1) is irreducible over GF(2). - V. Raman, Sep 17 2012 [Corrected by N. J. A. Sloane, Oct 17 2012]
Prime(n) is in the sequence if (and conjecturally only if) A133954(n) = prime(n). - Vladimir Shevelev, Aug 30 2013
Pollack shows that, on the GRH, that there is some C such that a(n+1) - a(n) < C infinitely often (in fact, 1 can be replaced by any positive integer). Further, for any m, a(n), a(n+1), ..., a(n+m) are consecutive primes infinitely often. - Charles R Greathouse IV, Jan 05 2015
From Jianing Song, Apr 27 2019: (Start)
All terms are congruent to 3 or 5 modulo 8. If we define
Pi(N,b) = # {p prime, p <= N, p == b (mod 8)};
Q(N) = # {p prime, p <= N, p in this sequence},
then by Artin's conjecture, Q(N) ~ C*N/log(N) ~ 2*C*(Pi(N,3) + Pi(N,5)), where C = A005596 is Artin's constant.
Conjecture: if we further define
Q(N,b) = # {p prime, p <= N, p == b (mod 8), p in this sequence},
then we have:
Q(N,3) ~ (1/2)*Q(N) ~ C*Pi(N,3);
Q(N,5) ~ (1/2)*Q(N) ~ C*Pi(N,5). (End)
Conjecture: for a prime p > 5, p has primitive root 2 iff p == +-3 (mod 8) divides 2^k + 3 for some k < p - 1 and divides 2^m + 5 for some m < p - 1. It seems that all primes of the form 2^k + 3 for k <> 2 (A057732) have primitive root 2. - Thomas Ordowski, Nov 27 2023
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 864.
E. Bach and Jeffrey Shallit, Algorithmic Number Theory, I; see p. 221.
J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, New York, 1996; see p. 169.
M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 56.
D. H. Lehmer and Emma Lehmer, Heuristics, anyone? in Studies in mathematical analysis and related topics, pp. 202-210, Stanford Univ. Press, Stanford, Calif., 1962.
Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 20.
D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, p. 81.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
Joerg Arndt, Matters Computational (The Fxtbook), pp. 876-878.
Richard Bartels, Generalized Loewy Length of Cohen-Macaulay Local and Graded Rings, arXiv:2308.14932 [math.AC], 2023. See p. 10.
Josep Conde, Mirka Miller, Josep M. Miret, and Kumar Saurav, On the Nonexistence of Almost Moore Digraphs of Degree Four and Five, Math. Comp. Sci. (2015) Vol. 9, No. 2, 145-149.
Jonathan Detchart and Jérôme Lacan, Improving the coding speed of erasure codes with polynomial ring transforms, arXiv:1709.00178 [cs.IT], 2017.
Karl Dilcher and Larry Ericksen, Reducibility and irreducibility of Stern (0, 1)-polynomials, Comm. Math. (2014) Vol. 22, 77-102.
Gabriele Fici and Estéban Gabory, Generalized De Bruijn Words, Invertible Necklaces, and the Burrows-Wheeler Transform, arXiv:2502.12844 [math.CO], 2025. See p. 12.
Rajiv Gupta and M. Ram Murty, A remark on Artin's conjecture, Invent. Math. (1984) Vol. 78, 127-230.
Christopher Hooley, On Artin's conjecture, J. Reine Angewandte Math. (1967) Vol. 225, 209-220.
Florian Ingels, Anaïs Denis, and Bastien Cazaux, Decomposing Words for Enhanced Compression: Exploring the Number of Runs in the Extended Burrows-Wheeler Transform, arXiv:2506.04926 [cs.DS], 2025. See p. 15.
Robert Jackson, Dmitriy Rumynin, and Oleg V. Zaboronski, An approach to RAID-6 based on cyclic groups, Appl. Math. Info. Sci. (2011) Vol. 5, No. 2, 148-170. See also arXiv:cs/0611109 [cs.IT], 2006-2010.
Jonas Kaiser, On the relationship between the Collatz conjecture and Mersenne prime numbers, arXiv:1608.00862 [math.GM], 2016.
Sihem Mesnager and Jean-Pierre Flori, A note on hyper-bent functions via Dillon-like exponents, IACR, Report 2012/033, 2012.
Pieter Moree, Artin's primitive root conjecture-a survey, arXiv:math/0412262 [math.NT], 2004-2012.
Friedrich Pillichshammer, Bounds for the quality parameter of digital shift nets over Z_2, Finite Fields Applic. (2002) Vol. 8, Issue 4, 444-454.
Paul Pollack, Bounded gaps between primes with a given primitive root, arXiv:1404.4007 [math.NT], 2014.
Vladimir Shevelev, On the Newman sum over multiples of a prime with a primitive or semiprimitive root 2, arXiv:0710.1354 [math.NT], 2007.
Qifu Tyler Sun, Hanqi Tang, Zongpeng Li, Xiaolong Yang, and Keping Long, Circular-shift Linear Network Codes with Arbitrary Odd Block Lengths, arXiv:1806.04635 [cs.IT], 2018.
Stephan Tornier, Groups Acting on Trees With Prescribed Local Action, arXiv:2002.09876 [math.GR], 2020.
Wouter van Doorn and Terence Tao, Growth rates of sequences governed by the squarefree properties of its translates, arXiv:2512.01087 [math.NT], 2025. See p. 6.
Eric Weisstein's World of Mathematics, Artin's constant.
Wikipedia, Artin's conjecture on primitive roots.
FORMULA
Delta(a(n),2^a(n)*x) = a(n)*Delta(a(n),2*x), where Delta(k,x) is the difference between numbers of evil(A001969) and odious(A000069) integers divisible by k in interval [0,x). - Vladimir Shevelev, Aug 30 2013
For n >= 2, a(n) = 1 + 2*A163782(n-1). - Antti Karttunen, Oct 07 2017
MATHEMATICA
Select[ Prime@Range@200, PrimitiveRoot@# == 2 &] (* Robert G. Wilson v, May 11 2001 *)
(* Alternative: *)
pr = 2; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == # - 1 &] (* N. J. A. Sloane, Jun 01 2010 *)
PROG
(PARI) forprime(p=3, 1000, if(znorder(Mod(2, p))==(p-1), print1(p, ", "))); \\ [corrected by Michel Marcus, Oct 08 2014]
(Python)
from itertools import islice
from sympy import nextprime, is_primitive_root
def A001122_gen(): # generator of terms
p = 2
while (p:=nextprime(p)):
if is_primitive_root(2, p):
yield p
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved
