login
This site is supported by donations 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
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, 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, 2, 5, 17, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

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

LINKS

Zhi-Wei Sun, Table of n, a(n) for n = 1..10000

Zhi-Wei Sun, Notes on primitive roots modulo primes, arXiv:1405.0290 [math.NT], 2014.

EXAMPLE

a(7) = 3 since 3 is a primitive root modulo prime(7) = 17 but 2 is not.

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[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}]

CROSSREFS

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

Sequence in context: A236433 A117122 A122828 * A035213 A083901 A274517

Adjacent sequences:  A242210 A242211 A242212 * A242214 A242215 A242216

KEYWORD

nonn

AUTHOR

Zhi-Wei Sun, May 07 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 17 16:51 EDT 2019. Contains 328120 sequences. (Running on oeis4.)