cp's OEIS Frontend

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.

A085013 a(1) = 1; for n>1, a(n) = smallest prime > a(n-1) such that a(1)*...*a(n) + 2 is a prime.

This page as a plain text file.
%I A085013 #6 Jan 09 2022 16:05:25
%S A085013 1,3,5,7,13,23,29,37,43,61,73,89,137,151,167,199,269,383,397,521,619,
%T A085013 659,739,1217,1307,1613,1741,1847,1873,2039,2473,2521,2531,3011,3391,
%U A085013 3637,3793,4201,4751,5039,5879,6299,7307,7829,8243,8933,9781,9829,10069
%N A085013 a(1) = 1; for n>1, a(n) = smallest prime > a(n-1) such that a(1)*...*a(n) + 2 is a prime.
%H A085013 Harvey P. Dale, <a href="/A085013/b085013.txt">Table of n, a(n) for n = 1..200</a>
%t A085013 a[1] = 1; a[n_] := a[n] = Block[{k = a[n - 1] + 2}, While[ !PrimeQ[k] || ! PrimeQ[ k * Times @@ Table[ a[i], {i, 1, n - 1}] + 2], k += 2]; k]; Table[ a[n], {n, 1, 49}]
%t A085013 nxt[{t_,a_}]:=Module[{p=NextPrime[a]},While[!PrimeQ[t*p+2],p= NextPrime[ p]];{t*p,p}]; NestList[nxt,{1,1},50][[All,2]] (* _Harvey P. Dale_, Jan 09 2022 *)
%Y A085013 Cf. A083566.
%K A085013 nonn
%O A085013 1,2
%A A085013 _Robert G. Wilson v_, Jun 17 2003