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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

1, 3, 15, 105, 1155, 15015, 255255, 4849845, 140645505, 4360010655, 178760436855, 7686698784765, 453515228301135, 27664428926369235, 1964174453772215685, 143384735125371745005, 14481858247662546245505
Offset: 0

Views

Author

Den Roussel (DenRoussel(AT)webtv.net)

Keywords

Examples

			a(0) = 1 by the usual convention for an empty product. - _N. J. A. Sloane_, Feb 15 2024
a(5) = 15015 because 3 * 5 * 7 * 11 * 13 = 15015.
		

Crossrefs

Programs

  • Mathematica
    nextTwin[{list_, q_}] := Module[{p=NextPrime[q]}, {Join[list, If[PrimeQ[p-2]||PrimeQ[p+2], {p}, {}]], p}]
    a001097[n_] := First[NestWhile[nextTwin, {{3}, 3}, Length[First[nextTwin[#]]]<=n&]]
    a048599[n_] := FoldList[Times, 1, a001097[n]]
    a048599[16] (* Hartmut F. W. Hoft, Apr 27 2021 *)
    Join[{1},FoldList[Times,Union[Flatten[Select[Partition[Prime[Range[30]],2,1],#[[2]]-#[[1]]==2&]]]]] (* Harvey P. Dale, Feb 15 2024 *)

Extensions

More terms from Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999

A153478 Sum of first n isolated (or single) primes A007510.

Original entry on oeis.org

2, 25, 62, 109, 162, 229, 308, 391, 480, 577, 690, 817, 948, 1105, 1268, 1435, 1608, 1819, 2042, 2275, 2526, 2783, 3046, 3323, 3616, 3923, 4240, 4571, 4908, 5261, 5620, 5987, 6360, 6739, 7122, 7511, 7908, 8309, 8718, 9157, 9600
Offset: 1

Views

Author

Omar E. Pol, Dec 27 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Select[Prime[Range[100]],!PrimeQ[#-2]&&!PrimeQ[#+2]&]]  (* Harvey P. Dale, Feb 08 2011 *)

A376890 Alternating sum of twin primes (A001097).

Original entry on oeis.org

3, -2, 5, -6, 7, -10, 9, -20, 11, -30, 13, -46, 15, -56, 17, -84, 19, -88, 21, -116, 23, -126, 25, -154, 27, -164, 29, -168, 31, -196, 33, -206, 35, -234, 37, -244, 39, -272, 41, -306, 43, -376, 45, -386, 47, -414, 49, -472, 51, -518, 53, -546, 55, -562, 57, -584, 59, -600, 61, -748
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 08 2024

Keywords

Crossrefs

Programs

  • Maple
    T1:= select(t -> isprime(t) and isprime(t+2), [seq(i,i=5..1000,6)]):
    T:= map(t -> (-t, t+2), T1): T:= [3,op(T)]:
    ListTools:-PartialSums(T); # Robert Israel, Nov 08 2024

Formula

a(n) = Sum_{k=1..n} (-1)^(k+1) * A001097(k).
a(2*n-1) = 2*n+1.
Showing 1-3 of 3 results.