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 A219429 #16 Apr 11 2021 22:16:54 %S A219429 0,2,3,5,7,11,11,13,19,19,17,19,29,29,43,41,47,59,61,67,59,59,79,83, %T A219429 83,89,101,103,103,107,109,127,131,109,139,109,151,149,163,131,167, %U A219429 179,181,167,179,197,191,173,223,223,227,227,227,239,251,257,257 %N A219429 Highest prime primitive root (less than p) for the n-th prime p. (or 0 if none exists). %H A219429 Robert Israel, <a href="/A219429/b219429.txt">Table of n, a(n) for n = 1..10000</a> %p A219429 f:=proc(n) local p,k; %p A219429 p:= ithprime(n); %p A219429 for k from p-1 to 1 by -1 do %p A219429 if numtheory:-order(k,p) = p-1 and isprime(k) then return k fi %p A219429 od; %p A219429 0 %p A219429 end proc; %p A219429 map(f, [$1..100]); # _Robert Israel_, Apr 11 2021 %t A219429 Reap[For[p = 2, p<1000, p = NextPrime[p], s = Select[PrimitiveRootList[p], PrimeQ]; Sow[If[s == {}, 0, Last[s]]]]][[2, 1]] (* _Jean-François Alcover_, Sep 03 2016 *) %o A219429 (PARI) forprime(i=2,600,p=0;for(q=1,i-1,if(znorder(Mod(q,i))==eulerphi(i)&&isprime(q),p=q));print1(p",")) %Y A219429 Cf. A002233 (lowest prime primitive root for the n-th prime). %Y A219429 Cf. A001918 (lowest primitive root for the n-th prime). %Y A219429 Cf. A071894 (highest primitive root (less than p) for the n-th prime p). %K A219429 nonn %O A219429 1,2 %A A219429 _V. Raman_, Nov 19 2012