login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242213 Least prime p < prime(n) such that the Bernoulli number B_{p-1} is a primitive root modulo prime(n), or 0 if such a prime p does not exist. 4

%I #10 Aug 05 2019 04:40:25

%S 0,0,2,2,3,2,3,17,2,2,7,2,3,19,2,2,3,2,17,2,7,2,3,3,13,2,2,3,3,3,3,3,

%T 3,5,2,3,3,7,2,2,3,2,2,5,2,2,5,3,3,3,3,2,7,3,3,2,2,2,3,5,11,2,13,2,11,

%U 2,5,17,3,2

%N Least prime p < prime(n) such that the Bernoulli number B_{p-1} is a primitive root modulo prime(n), or 0 if such a prime p does not exist.

%C According to the conjecture in A242210, a(n) should be positive for all n > 2.

%H Zhi-Wei Sun, <a href="/A242213/b242213.txt">Table of n, a(n) for n = 1..10000</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(7) = 3 since 3 is a primitive root modulo prime(7) = 17 but 2 is not.

%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[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}];Print[n," ",Prime[k]];Goto[bb];Label[aa];Continue,{k,1,n-1}];Print[n," ",0];Label[bb];Continue,{n,1,70}]

%Y Cf. A000040, A027641, A027642, A242193, A242210.

%K nonn

%O 1,3

%A _Zhi-Wei Sun_, May 07 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:58 EDT 2024. Contains 371798 sequences. (Running on oeis4.)