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 A051315 #23 Oct 07 2023 21:38:02 %S A051315 31,2,3,11,23,47059,7,5,89,19,2287,233,17,647,1607,12637,103,13,163, %T A051315 4980301,521,83,16561,540233,443516695049428313,109,37,1811,53,487, %U A051315 548519020982014152563328120144563684918808813765009178152503015356294212417026402782591 %N A051315 Euclid-Mullin sequence (A000945) with initial value a(1)=31 instead of a(1)=2. %H A051315 Tyler Busby, <a href="/A051315/b051315.txt">Table of n, a(n) for n = 1..37</a> (terms 1..36 from Robert Price) %p A051315 spf:= proc(n) local F; %p A051315 F:= select(type, map(t -> t[1], ifactors(n,easy)[2]), integer); %p A051315 if F <> [] then min(F) %p A051315 else min(numtheory:-factorset(n)) %p A051315 fi %p A051315 end proc: %p A051315 a[1]:= 31: %p A051315 for i from 2 to 31 do %p A051315 a[i]:= spf(1 + mul(a[j],j=1..i-1)) %p A051315 od: %p A051315 seq(a[i],i=1..31); # _Robert Israel_, Nov 25 2015 %t A051315 a[1]=31; a[n_] := First[ Flatten[ FactorInteger[ 1+Product[ a[ j ], {j, 1, n-1} ] ] ] ]; Array[a, 10] %o A051315 (PARI) gpf(n)=my(f=factor(n)[, 1]); f[#f]; %o A051315 first(m)=my(v=vector(m)); v[1]=31; for(i=2, m, v[i]=gpf(1+prod(j=1, i-1, v[j]))); v \\ _Anders Hellström_, Nov 25 2015 %Y A051315 Cf. A000945, A000946, A005265, A005266. %K A051315 easy,nonn %O A051315 1,1 %A A051315 _Labos Elemer_