OFFSET
1,5
COMMENTS
a(n) = 0 only for prime(n) = 2, 3 and 7. Cohen proved that every finite field of order other than 2, 3 or 7 contains a pair of consecutive primitive roots.
a(n) is not determined by A008330(n) = phi(prime(n)-1): the deviation from the asymptotic main term is of order sqrt(prime(n)).
REFERENCES
S. D. Cohen, Pairs of primitive roots, Mathematika 32 (1985), 276-285.
LINKS
Daniel Okwor, Table of n, a(n) for n = 1..9592
S. D. Cohen, T. Oliveira e Silva and T. Trudgian, On consecutive primitive elements in a finite field, arXiv:1410.6210 [math.NT], 2014; Bull. London Math. Soc. 47 (2015), 418-426.
FORMULA
a(n) ~ phi(p-1)^2/(p-1), where p = prime(n), the count predicted if being a primitive root were independent at g and g+1.
EXAMPLE
prime(5) = 11 has primitive roots 2, 6, 7 and 8. The consecutive pairs among them are (6,7) and (7,8), so a(5) = 2.
PROG
(PARI) a(n) = my(p=prime(n), c=0); for(x=1, p-2, if(znorder(Mod(x, p))==p-1 && znorder(Mod(x+1, p))==p-1, c++)); c
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel Okwor, Jul 20 2026
STATUS
approved