A097490 Primes which are two greater than A097489 terms.
5, 17, 167, 302946354048717875530381041444257, 17164738545781348456175905084853738838912866540727619406614703260339837793050935010265073947
Offset: 1
Keywords
Examples
a(3) = 167 = (Product_{k=1..3} A001359(k)) + 2 = 3 * 5 * 11 + 2 = A097489(3) + 2. - _Hartmut F. W. Hoft_, Apr 27 2021
Links
- Amiram Eldar, Table of n, a(n) for n = 1..6
Programs
-
Mathematica
step[{list_, q_}] := Module[{p=NextPrime[q]}, {Join[list, If[PrimeQ[p+2], {{p,p+2}}, {}]], p}] smallerTwin[n_] := First[Transpose[First[NestWhile[step, {{{3, 5}}, 3}, Length[First[step[#]]]<=n&]]]] a097489[n_] := Rest[FoldList[Times, 1, smallerTwin[n]]] a097490[n_] := Select[Map[#+2&, a097489[n]], PrimeQ] a097490[39] (* Hartmut F. W. Hoft, Apr 27 2021 *)
-
PARI
fp(n) = p=1;for(x=1,n,p*=twinl(x);if(isprime(p+2),print1(p+2", "))) twinl(n) = { local(c,x); c=0; x=1; while(c
Extensions
Edited by Don Reble, Apr 16 2007