login
A397140
a(n) = number of positive g < prime(n) such that g and g+1 are both primitive roots modulo prime(n).
1
0, 0, 1, 0, 2, 1, 4, 3, 4, 5, 3, 3, 6, 5, 10, 11, 14, 5, 4, 7, 8, 8, 20, 18, 12, 15, 13, 26, 12, 20, 10, 17, 30, 12, 35, 11, 16, 19, 40, 41, 44, 15, 31, 20, 37, 15, 10, 22, 56, 22, 54, 38, 16, 40, 64, 64, 65, 19, 28, 38, 32, 71, 30, 42, 28, 77, 24, 22, 86, 37, 74, 88, 39, 39, 34, 94
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
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
KEYWORD
nonn
AUTHOR
Daniel Okwor, Jul 20 2026
STATUS
approved