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 A007459 M0660 #66 Sep 09 2023 11:34:51 %S A007459 2,3,5,7,11,13,19,23,29,31,37,43,47,53,59,61,67,71,79,101,107,127,131, %T A007459 139,149,151,157,173,181,191,197,199,211,223,229,263,269,277,283,311, %U A007459 317,331,347,349,367,373,383,397,419,421,431,461,463,491,509,523,547,557,571 %N A007459 Higgs's primes: a(n+1) = smallest prime > a(n) such that a(n+1)-1 divides the product (a(1)...a(n))^2. %C A007459 Named after the British mathematician Denis A. Higgs (1932-2011). - _Amiram Eldar_, Jun 05 2021 %C A007459 No prime of the form a*b^k + 1 (those in A089200) with a > 0, b > 1 and k > 2 is a Higgs's prime. - _Mauro Fiorentini_, Aug 08 2023 %D A007459 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A007459 T. D. Noe, <a href="/A007459/b007459.txt">Table of n, a(n) for n = 1..1000</a> %H A007459 Stanley Burris and Simon Lee, <a href="http://www.jstor.org/stable/2324454">Tarski's high school identities</a>, Amer. Math. Monthly, Vol. 100, No. 3 (1993), pp. 231-236. %H A007459 Robert G. Wilson v, <a href="/A007459/a007459.pdf">Note to N. J. A. Sloane with attachment</a>, (Annotated scanned copy of The Am. Math. Mo. Vol. 100 No. 3 pp. 233, Mar. 1993). %H A007459 Robert G. Wilson v, <a href="/A007376/a007376.pdf">Letter to N. J. A. Sloane, Oct. 1993</a> %p A007459 a:=[2]; P:=1; j:=1; %p A007459 for n from 2 to 32 do %p A007459 P:=P*a[n-1]^2; %p A007459 for i from j+1 to 250 do %p A007459 if (P mod (ithprime(i)-1)) = 0 then %p A007459 a:=[op(a),ithprime(i)]; j:=i; break; fi; %p A007459 od: %p A007459 od: %p A007459 a; # _N. J. A. Sloane_, Feb 12 2017 %t A007459 f[ n_List ] := (a = n; b = Apply[ Times, a^2 ]; d = NextPrime[ a[ [ -1 ] ] ]; While[ ! IntegerQ[ b/(d - 1) ] || d > b, d = NextPrime[ d ] ]; AppendTo[ a, d ]; Return[ a ]); Nest[ f, {2}, 75 ] %t A007459 nxt[{p_,a_}]:=Module[{np=NextPrime[a]},While[PowerMod[p,2,np-1] != 0,np = NextPrime[np]];{p*np,np}]; NestList[nxt,{2,2},60][[All,2]] (* _Harvey P. Dale_, Jul 09 2021 *) %o A007459 (Haskell) %o A007459 a007459 n = a007459_list !! (n-1) %o A007459 a007459_list = f 1 a000040_list where %o A007459 f q (p:ps) = if mod q (p - 1) == 0 then p : f (q * p ^ 2) ps else f q ps %o A007459 -- _Reinhard Zumkeller_, Apr 14 2013 %o A007459 (PARI) step(v)=my(N=vecprod(v)^2);forprime(p=v[#v]+1,,if(N%(p-1)==0,return(concat(v,p)))) %o A007459 first(n)=my(v=[2]);for(i=2,n,v=step(v));v \\ _Charles R Greathouse IV_, Jun 11 2015 %Y A007459 Cf. A057447, A057448, A057459, A089200, A282027. %K A007459 nonn,nice %O A007459 1,1 %A A007459 _N. J. A. Sloane_ %E A007459 More terms from _David W. Wilson_ %E A007459 Definition clarified by _N. J. A. Sloane_, Feb 12 2017