cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A242210 Number of primes p < prime(n) such that the Bernoulli number B_{p-1} is a primitive root modulo prime(n).

Original entry on oeis.org

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, 9, 10, 10, 17, 11, 7, 11, 18, 22, 15, 11, 12, 15, 21, 15, 10, 15, 23, 18, 26, 15, 15, 22, 26, 22, 25, 19, 26, 22, 22, 20, 17, 23, 20, 28, 17, 18, 28, 22
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2014

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

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