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.

A048599 Partial products of the sequence (A001097) of twin primes.

This page as a plain text file.
%I A048599 #14 Feb 15 2024 18:55:29
%S A048599 1,3,15,105,1155,15015,255255,4849845,140645505,4360010655,
%T A048599 178760436855,7686698784765,453515228301135,27664428926369235,
%U A048599 1964174453772215685,143384735125371745005,14481858247662546245505
%N A048599 Partial products of the sequence (A001097) of twin primes.
%e A048599 a(0) = 1 by the usual convention for an empty product. - _N. J. A. Sloane_, Feb 15 2024
%e A048599 a(5) = 15015 because 3 * 5 * 7 * 11 * 13 = 15015.
%t A048599 nextTwin[{list_, q_}] := Module[{p=NextPrime[q]}, {Join[list, If[PrimeQ[p-2]||PrimeQ[p+2], {p}, {}]], p}]
%t A048599 a001097[n_] := First[NestWhile[nextTwin, {{3}, 3}, Length[First[nextTwin[#]]]<=n&]]
%t A048599 a048599[n_] := FoldList[Times, 1, a001097[n]]
%t A048599 a048599[16] (* _Hartmut F. W. Hoft_, Apr 27 2021 *)
%t A048599 Join[{1},FoldList[Times,Union[Flatten[Select[Partition[Prime[Range[30]],2,1],#[[2]]-#[[1]]==2&]]]]] (* _Harvey P. Dale_, Feb 15 2024 *)
%Y A048599 Cf. A048598, A001097.
%K A048599 easy,nonn
%O A048599 0,2
%A A048599 Den Roussel (DenRoussel(AT)webtv.net)
%E A048599 More terms from Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999