OFFSET
1,1
EXAMPLE
The first two twin prime pairs are (3,5) and (5,7), their products: 15 and 35, therefore a(2)=15*35=525.
MATHEMATICA
a = {4, 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150} (* A014574 *); Table[ Product[a[[k]]^2 - 1, {k, 1, n}], {n, 1, 12}]
Rest[FoldList[Times, 1, Times@@@Select[Partition[Prime[Range[50]], 2, 1], #[[2]]-#[[1]]==2&]]] (* Harvey P. Dale, Jan 19 2015 *)
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&]]
a037074[n_] := Map[Apply[Times, #]&, pairList[n]]
a074040[n_] := Rest[FoldList[Times, 1, a037074[n]]]
a074040[11] (* Hartmut F. W. Hoft, Apr 27 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 13 2002
EXTENSIONS
Edited by Robert G. Wilson v, Aug 17 2002
Corrections in Comment and Example, and added references. Hartmut F. W. Hoft, Apr 27 2021
STATUS
approved