cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A074040 Product of first n twin prime pair products.

Original entry on oeis.org

15, 525, 75075, 24249225, 21800053275, 38433493923825, 138322144631846175, 716923675626858725025, 7458156997546211316435075, 86984485062381462583582279725, 1656445549042930191979157352803175
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 13 2002

Keywords

Examples

			The first two twin prime pairs are (3,5) and (5,7), their products: 15 and 35, therefore a(2)=15*35=525.
		

Crossrefs

Programs

  • 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 *)

Formula

a(1) = A037074(1) and a(n) = a(n-1)*A037074(n) for n>1.
a(n) = A079164(2*n).

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