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 A234972 #19 Jul 26 2014 05:08:42 %S A234972 0,0,2,2,3,3,2,2,3,2,2,17,3,2,5,2,5,3,3,3,5,2,11,2,3,2,13,3,7,2,2,5,2, %T A234972 2,2,3,11,2,11,2,3,7,7,7,2,2,2,2,5,3,2,3,3,7,2,3,2,11,5,2,2,2,5,5,5,2, %U A234972 2,5,3,3,2,3,7,7,2,7,2,3,2,7,5,31,3,3,5,3,2,5,2,2,5,5,2,3,3,5,2,2,7,7 %N A234972 Least prime p < prime(n) such that 2^p - 1 is a primitive root modulo prime(n), or 0 if such a prime p does not exist. %C A234972 Conjecture: a(n) > 0 for all n > 2. %H A234972 Zhi-Wei Sun, <a href="/A234972/b234972.txt">Table of n, a(n) for n = 1..2000</a> %e A234972 a(3) = 2 since 2 is a prime smaller than prime(3) = 5 with 2^2 - 1 = 3 a primitive root modulo prime(3) = 5. %t A234972 gp[g_,p_]:=Mod[g,p]>0&&(Length[Union[Table[Mod[g^k, p],{k,1,p-1}]]]==p-1) %t A234972 Do[Do[If[gp[2^(Prime[k])-1,Prime[n]],Print[n," ",Prime[k]];Goto[aa]],{k,1,n-1}];Print[n," ",0];Label[aa];Continue,{n,1,100}] %Y A234972 Cf. A000040, A001348, A001918. %K A234972 nonn %O A234972 1,3 %A A234972 _Zhi-Wei Sun_, Apr 20 2014