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 A046966 #43 Feb 13 2024 06:56:10 %S A046966 1,2,3,5,6,9,12,16,22,25,29,31,35,47,57,61,66,79,81,108,114,148,163, %T A046966 172,185,198,203,205,236,265,275,282,294,312,344,359,377,397,398,411, %U A046966 427,431,493,512,589,647,648,660,708,719,765,887,911,916,935,1062,1093 %N A046966 a(n) is the smallest number > a(n-1) such that a(1)*a(2)*...*a(n) + 1 is prime. %D A046966 H. Dubner, Recursive Prime Generating Sequences, Table 4 pp. 173 Journal of Recreational Mathematics 29(3) 1998 Baywood NY. %H A046966 Charles R Greathouse IV and T. D. Noe, <a href="/A046966/b046966.txt">Table of n, a(n) for n = 1..500</a> (first 200 terms from Noe) %e A046966 1*2*3*5 + 1 = 31 is prime. %t A046966 a[1] = 1; p[1] = 1; %t A046966 a[n_] := a[n] = For[an = a[n-1] + 1, True, an++, pn = p[n-1]*an; If[ PrimeQ[pn+1], p[n] = pn; Return[an] ] ]; %t A046966 Table[a[n], {n, 1, 60}] %t A046966 (* _Jean-François Alcover_, Sep 17 2012 *) %t A046966 Module[{cc={1},k},Do[k=Last[cc]+1;While[!PrimeQ[Times@@Join[cc,{k}]+1], k++];AppendTo[cc,k],{60}];cc] (* _Harvey P. Dale_, Jan 21 2013 *) %t A046966 nxt[{t_,a_}]:=Module[{k=a+1},While[CompositeQ[t*k+1],k++];{t*k,k}]; NestList[nxt,{1,1},60][[All,2]] (* _Harvey P. Dale_, May 22 2021 *) %o A046966 (PARI) first(n)=my(v=vector(n),N=1,t=1); v[1]=1; for(k=2,n, while(!ispseudoprime(1 + N*t++),); N*=v[k]=t); v \\ _Charles R Greathouse IV_, Apr 07 2020 %Y A046966 Cf. A046972. %K A046966 nonn,nice %O A046966 1,2 %A A046966 _G. L. Honaker, Jr._ %E A046966 More terms from _Jason Earls_, Jan 25 2002 %E A046966 Definition corrected by _T. D. Noe_, Feb 14 2007