%I #27 Aug 05 2019 04:40:19
%S 0,0,1,2,1,2,2,1,4,2,3,6,3,2,5,6,5,7,4,6,6,10,11,12,8,10,9,12,10,13,9,
%T 9,10,10,17,11,7,11,18,22,15,11,12,15,21,15,10,15,23,18,26,15,15,22,
%U 26,22,25,19,26,22,22,20,17,23,20,28,17,18,28,22
%N Number of primes p < prime(n) such that the Bernoulli number B_{p-1} is a primitive root modulo prime(n).
%C 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.
%C (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.
%C We have verified part (i) for n up to 4.2*10^5, and part (ii) for primes p below 10^6.
%H Zhi-Wei Sun, <a href="/A242210/b242210.txt">Table of n, a(n) for n = 1..500</a>
%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1405.0290">Notes on primitive roots modulo primes</a>, arXiv:1405.0290 [math.NT], 2014.
%e 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.
%e a(5) = 1 since B_{3-1} = 1/6 == 2 (mod 11) with 2 a primitive root modulo prime(5) = 11.
%e a(8) = 1 since B_{17-1} = -3617/510 == -4 (mod 19) with -4 a primitive root modulo prime(8) = 19.
%t rMod[m_,n_]:=Mod[Numerator[m]*PowerMod[Denominator[m],-1,n],n,-n/2]
%t f[k_]:=BernoulliB[Prime[k]-1]
%t dv[n_]:=Divisors[n]
%t 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}]
%Y Cf. A000040, A027641, A027642, A122045, A242193, A242194, A242213.
%K nonn
%O 1,4
%A _Zhi-Wei Sun_, May 07 2014
|