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 A242242 #9 Aug 05 2019 04:40:46 %S A242242 1,0,2,5,2,2,3,2,5,2,3,2,6,3,5,2,2,2,2,7,5,3,2,3,5,2,5,2,6,3,3,2,3,2, %T A242242 2,6,5,2,5,2,2,2,19,5,2,3,2,3,2,6,3,7,7,6,3,5,2,6,5,3,3,2,5,17,10,2,3, %U A242242 10,2,2 %N A242242 Least positive primitive root g < prime(n) modulo prime(n) with 2^g - 1 also a primitive root modulo prime(n), or 0 if such a number g does not exist. %C A242242 Conjecture: a(n) > 0 except for n = 2. In other words, for any prime p > 3, there exists a primitive root 0 < g < p modulo p such that 2^g - 1 is also a primitive root modulo p. %H A242242 Zhi-Wei Sun, <a href="/A242242/b242242.txt">Table of n, a(n) for n = 1..10000</a> %H A242242 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 A242242 a(4) = 5 since both 5 and 2^5 - 1 = 31 are primitive roots modulo prime(4) = 7, but none of 1, 2, 4 and 2^3 - 1 is a primitive root modulo prime(4) = 7. %t A242242 f[n_]:=f[n]=2^n-1 %t A242242 dv[n_]:=Divisors[n] %t A242242 Do[Do[If[Mod[f[k],Prime[n]]==0,Goto[aa]];Do[If[Mod[k^(Part[dv[Prime[n]-1],j])-1,Prime[n]]==0,Goto[aa]],{j,1,Length[dv[Prime[n]-1]]-1}];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}]; %t A242242 Print[n," ",k];Goto[bb];Label[aa];Continue,{k,1,Prime[n]-1}];Label[cc];Print[n," ",0];Label[bb];Continue,{n,1,70}] %Y A242242 Cf. A000040, A000225, A234972, A236966. %K A242242 nonn %O A242242 1,3 %A A242242 _Zhi-Wei Sun_, May 09 2014