OFFSET
1,4
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 2. In other words, for any prime p > 3, there exists a prime q < p such that the Bernoulli number B_{q-1} is a primitive root modulo p.
(ii) For any prime p > 13, there exists a prime q < p such that the Euler number E_{q-1} is a primitive root modulo p.
We have verified part (i) for n up to 4.2*10^5, and part (ii) for primes p below 10^6.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..500
Zhi-Wei Sun, Notes on primitive roots modulo primes, arXiv:1405.0290 [math.NT], 2014.
EXAMPLE
a(4) = 2 since 3 is a primitive root modulo prime(4) = 7, and both B_{2-1} = - 1/2 and B_{5-1} = - 1/30 are congruent to 3 modulo 7.
a(5) = 1 since B_{3-1} = 1/6 == 2 (mod 11) with 2 a primitive root modulo prime(5) = 11.
a(8) = 1 since B_{17-1} = -3617/510 == -4 (mod 19) with -4 a primitive root modulo prime(8) = 19.
MATHEMATICA
rMod[m_, n_]:=Mod[Numerator[m]*PowerMod[Denominator[m], -1, n], n, -n/2]
f[k_]:=BernoulliB[Prime[k]-1]
dv[n_]:=Divisors[n]
Do[m=0; Do[If[rMod[f[k], Prime[n]]==0, Goto[aa]]; Do[If[rMod[f[k]^(Part[dv[Prime[n]-1], i])-1, Prime[n]]==0, Goto[aa]], {i, 1, Length[dv[Prime[n]-1]]-1}]; m=m+1; Label[aa]; Continue, {k, 1, n-1}]; Print[n, " ", m]; Continue, {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 07 2014
STATUS
approved