OFFSET
1,1
COMMENTS
A097491(8) = 2948...794027 has 76 digits and A097491(9) = 152400...802327 has 288 digits. - Hartmut F. W. Hoft, Apr 27 2021
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..9
EXAMPLE
a(3) = 21800053277 = A079164(17) + 2 = 3*5*5*7*11*13*17*19*29*31 + 2. - Hartmut F. W. Hoft, Apr 27 2021
MATHEMATICA
step[{list_, q_}] := Module[{p=NextPrime[q]}, {Join[list, If[PrimeQ[p+2], {{p, p+2}}, {}]], p}]
pairList[n_] := First[NestWhile[step, {{{3, 5}}, 3}, Length[First[step[#]]]<=n&]]
a079164[n_] := Rest[FoldList[Times, 1, Take[Flatten[pairList[n]], n]]]
a097491[n_] := Select[Map[#+2&, a079164[n]], PrimeQ]
a097491[39] (* Hartmut F. W. Hoft, Apr 27 2021 *)
PROG
(PARI) ft(n) = p=1; for(x=1, n, p*=twinl(x); if(isprime(p+2), print1(p+2", ")); p*=twinu(x); if(isprime(p+2), print1(p+2", ")))
twinl(n) = { local(c, x); c=0; x=1; while(c<n, if(isprime(prime(x)+2), c++); x++; ); return(prime(x-1)) }
twinu(n) = { local(c, x); c=0; x=1; while(c<n, if(isprime(prime(x)+2), c++); x++; ); return(prime(x)) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Aug 24 2004
EXTENSIONS
Edited by Don Reble, Apr 16 2007
Name corrected by Hartmut F. W. Hoft, Apr 27 2021
STATUS
approved