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 A291657 #17 Aug 30 2017 04:28:42 %S A291657 2,3,7,11,13,41,71,79,83,107,109,131,139,157,163,173,179,191,211,223, %T A291657 229,263,271,277,293,311,313,317,337,353,359,367,373,389,419,431,439, %U A291657 449,457,463,479,521,547,569,577,593,607,641,661,709,719,727,743,757,761,769,787,811,823,827 %N A291657 Primes p such that p is a primitive root modulo prime(p). %C A291657 The conjecture in A291615 implies that the current sequence has infinitely many terms. In fact, if there are only finitely many primes p with p a primitive root modulo prime(p) and we let P denote the product of all such primes, then by Dirichlet's theorem there is a prime q == 1 (mod 4*P) and hence any prime p with p a primitive root modulo prime(p) is a quadratic residue modulo q and hence not a primitive root modulo q. %C A291657 Conjecture: a(n)/(n*log(n)) has a positive limit as n tends to the infinity. Equivalently, all the terms in this sequence form a subset of the set of all primes with positive asymptotic density. %H A291657 Zhi-Wei Sun, <a href="/A291657/b291657.txt">Table of n, a(n) for n = 1..10000</a> %H A291657 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1405.0290">New observations on primitive roots modulo primes</a>, arXiv:1405.0290 [math.NT], 2014. %e A291657 a(1) = 2 since the first prime 2 is a primitive root modulo prime(2) = 3. %e A291657 a(2) = 3 since the prime 3 is a primitive root modulo prime(3) = 5. %t A291657 p[n_]:=p[n]=Prime[n]; %t A291657 n=0;Do[Do[If[Mod[p[k]^(Part[Divisors[p[p[k]]-1],i])-1,p[p[k]]]==0,Goto[aa]],{i,1,Length[Divisors[p[p[k]]-1]]-1}]; %t A291657 n=n+1;Print[n," ",p[k]];Label[aa],{k,1,145}] %Y A291657 Cf. A000040, A242345, A243164, A243403, A291615, A291690. %K A291657 nonn %O A291657 1,1 %A A291657 _Zhi-Wei Sun_, Aug 28 2017