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.
%I A242213 #10 Aug 05 2019 04:40:25 %S A242213 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 A242213 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 A242213 2,5,17,3,2 %N 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. %C A242213 According to the conjecture in A242210, a(n) should be positive for all n > 2. %H A242213 Zhi-Wei Sun, <a href="/A242213/b242213.txt">Table of n, a(n) for n = 1..10000</a> %H A242213 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 A242213 a(7) = 3 since 3 is a primitive root modulo prime(7) = 17 but 2 is not. %t A242213 rMod[m_,n_]:=Mod[Numerator[m]*PowerMod[Denominator[m],-1,n],n,-n/2] %t A242213 f[k_]:=BernoulliB[Prime[k]-1] %t A242213 dv[n_]:=Divisors[n] %t A242213 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 A242213 Cf. A000040, A027641, A027642, A242193, A242210. %K A242213 nonn %O A242213 1,3 %A A242213 _Zhi-Wei Sun_, May 07 2014