A097493 Primes which are two greater than A097492 terms.
7, 37, 457, 8647, 51315414607
Offset: 1
Keywords
Examples
a(4) = 8647 = (Product_{k=1..4} A006512(k)) + 2 = 5*7*13*19 + 2 = A097492(4) + 2. - _Hartmut F. W. Hoft_, Apr 27 2021
Links
- Amiram Eldar, Table of n, a(n) for n = 1..7
Programs
-
Mathematica
step[{list_, q_}] := Module[{p=NextPrime[q]}, {Join[list, If[PrimeQ[p+2], {{p,p+2}}, {}]], p}] largerTwin[n_] := Last[Transpose[First[NestWhile[step, {{{3, 5}}, 3}, Length[First[step[#]]]<=n&]]]] a097492[n_] := Rest[FoldList[Times, 1, largerTwin[n]]] a097493[n_] := Select[Map[#+2&, a097492[n]], PrimeQ] a097493[68] (* Hartmut F. W. Hoft, Apr 27 2021 *)
-
PARI
fu(n) = p=1;for(x=1,n,p*=twinu(x);if(isprime(p+2),print1(p+2", "))) twinu(n) = { local(c,x); c=0; x=1; while(c
Extensions
Edited by Don Reble, Apr 16 2007
Comments