|
|
A097491
|
|
Primes which are two greater than the terms of A079164.
|
|
5
|
|
|
5, 17, 21800053277, 72409291238312731227527, 86984485062381462583582279727, 21679097826151232817152558557032490897727272048343000297777, 107025222275017133994159705286756083545279583250537082122450588876727
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
|
|
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]
|
|
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", "))) \The n-th lower twin prime twinl(n) = { local(c, x); c=0; x=1; while(c<n, if(isprime(prime(x)+2), c++); x++; ); return(prime(x-1)) } \The n-th upper twin prime 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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|