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-6 of 6 results.

A118750 a(n) = product[k=1..n] P(k), where P(k) is the largest prime <= 3*k. a(n) = product[k=1..n] A118749(k).

Original entry on oeis.org

3, 15, 105, 1155, 15015, 255255, 4849845, 111546435, 2565568005, 74401472145, 2306445636495, 71499814731345, 2645493145059765, 108465218947450365, 4664004414740365695, 219208207492797187665, 10302785752161467820255
Offset: 1

Views

Author

Jonathan Vos Post, Apr 29 2006

Keywords

Comments

Differs from (after first term) A048599 "Partial products of the sequence (A001097) of twin primes" after 8th term. Differs from (after first term) A070826 "One half of product of first n primes A000040" after 9th term. Analogous to A118455 a(1)=1. a(n) = product{k=1..n} P(k), where P(k) is the largest prime <= k.

Crossrefs

A097491 Primes which are two greater than the terms of A079164.

Original entry on oeis.org

5, 17, 21800053277, 72409291238312731227527, 86984485062381462583582279727, 21679097826151232817152558557032490897727272048343000297777, 107025222275017133994159705286756083545279583250537082122450588876727
Offset: 1

Views

Author

Cino Hilliard, Aug 24 2004

Keywords

Comments

A097491(8) = 2948...794027 has 76 digits and A097491(9) = 152400...802327 has 288 digits. - Hartmut F. W. Hoft, Apr 27 2021

Examples

			a(3) = 21800053277 = A079164(17) + 2 = 3*5*5*7*11*13*17*19*29*31 + 2. - _Hartmut F. W. Hoft_, Apr 27 2021
		

Crossrefs

Programs

  • 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]
    a097491[39] (* Hartmut F. W. Hoft, Apr 27 2021 *)
  • 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", ")))
    twinl(n) = { local(c,x); c=0; x=1; while(c
    				

Extensions

Edited by Don Reble, Apr 16 2007
Name corrected by Hartmut F. W. Hoft, Apr 27 2021

A048598 Partial sums of the sequence (A001097) of twin primes.

Original entry on oeis.org

3, 8, 15, 26, 39, 56, 75, 104, 135, 176, 219, 278, 339, 410, 483, 584, 687, 794, 903, 1040, 1179, 1328, 1479, 1658, 1839, 2030, 2223, 2420, 2619, 2846, 3075, 3314, 3555, 3824, 4095, 4376, 4659, 4970, 5283, 5630, 5979, 6398, 6819, 7250
Offset: 1

Views

Author

Den Roussel (DenRoussel(AT)webtv.net)

Keywords

Examples

			a(5) = 39 because 3 + 5 + 7 + 11 + 13 = 39.
		

Crossrefs

Cf. A048599.

Programs

  • Mathematica
    Accumulate[Union[Flatten[Select[Partition[Prime[Range[100]],2,1],#[[2]] - #[[1]]==2&]]]] (* Harvey P. Dale, Apr 29 2012 *)

Extensions

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

A284203 Number of twin prime (A001097) divisors of n.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 2, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 0, 2, 1, 2, 1, 0, 1, 2, 1, 1, 2, 1, 1, 2, 0, 0, 1, 1, 1, 2, 1, 0, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 0, 2, 2, 0, 1, 1, 2, 1, 1, 1, 0, 2, 1, 2, 2, 0, 1, 1, 1, 0, 2, 2, 1, 2, 1, 0, 2, 2, 0, 2, 0, 2, 1, 0, 1, 2, 1, 1, 2, 1, 1, 3, 0, 1, 1, 1, 2
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 22 2017

Keywords

Examples

			--------------------------------------------
| n | divisors of n | twin prime    | a(n) |
|   |               | divisors of n |      |
|------------------------------------------
| 1 | {1}           |      {-}      |  0   |
| 2 | {1, 2}        |      {-}      |  0   |
| 3 | {1, 3}        |      {3}      |  1   |
| 4 | {1, 2, 4}     |      {-}      |  0   |
| 5 | {1, 5}        |      {5}      |  1   |
| 6 | {1, 2, 3, 6}  |      {3}      |  1   |
| 7 | {1, 7}        |      {7}      |  1   |
| 8 | {1, 2, 4, 8}  |      {-}      |  0   |
| 9 | {1, 3, 9}     |      {3}      |  1   |
--------------------------------------------
		

Crossrefs

Cf. A048599 (positions of records).

Programs

  • Mathematica
    nmax = 110; Rest[CoefficientList[Series[Sum[Boole[PrimeQ[k] && (PrimeQ[k - 2] || PrimeQ[k + 2])] x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]]
    Table[Length[Select[Divisors[n], PrimeQ[#] && (PrimeQ[# - 2] || PrimeQ[# + 2]) &]], {n, 110}]
  • PARI
    concat([0, 0],Vec(sum(k=1, 110, (isprime(k) && (isprime(k - 2) || isprime(k + 2)))* x^k/(1 - x^k)) + O(x^111))) \\ Indranil Ghosh, Mar 22 2017
    
  • PARI
    a(n) = sumdiv(n, d, isprime(d) && (isprime(d-2) || isprime(d+2))); \\ Amiram Eldar, Jun 03 2024
    
  • Python
    from sympy import isprime, divisors
    print([len([i for i in divisors(n) if isprime(i) and (isprime(i - 2) or isprime(i + 2))]) for n in range(1, 111)]) # Indranil Ghosh, Mar 22 2017

Formula

G.f.: Sum_{k>=1} x^A001097(k)/(1 - x^A001097(k)).
a(A062729(n)) = 0. - Ilya Gutkovskiy, Apr 02 2017
From Amiram Eldar, Jun 03 2024: (Start)
a(A048599(n)) = n.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A065421 - 1/5 = 1.7021605... . (End)
Additive with a(p^e) = 1 if p is in A001097, and 0 otherwise. - Amiram Eldar, May 15 2025
a(A037074(n)) = 2. - Michel Marcus, May 15 2025

A074043 Denominator of Sum_{k=1..n} 1/A077800(k), numerator=A074042.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 13 2002

Keywords

Comments

For n>2, a(n) = A048599(n-1).
A074042(n)/a(n) -> Brun's constant (A065421).

Crossrefs

Essentially the same as A048599.

Extensions

Edited by Max Alekseyev, May 10 2009

A334141 Numbers that are the product of distinct twin primes.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 21, 29, 31, 33, 35, 39, 41, 43, 51, 55, 57, 59, 61, 65, 71, 73, 77, 85, 87, 91, 93, 95, 101, 103, 105, 107, 109, 119, 123, 129, 133, 137, 139, 143, 145, 149, 151, 155, 165, 177, 179, 181, 183, 187, 191, 193, 195, 197, 199
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 15 2020

Keywords

Crossrefs

Subsequence of A005117.

Programs

  • Maple
    N:= 1000: # for terms <= N
    P:= select(isprime, {seq(i,i=3..N+2,2)}):
    TP:= P intersect map(`+`,P,2):
    TP:= map(t -> (t-2,t), TP):
    TP:= sort(convert(TP,list)):
    S:= {1}:
    for i from 1 to nops(TP) do
      S0:= S;
      S:= S union map(`*`, select(`<=`,S,N/TP[i]),TP[i]);
    od:
    sort(convert(S,list)); # Robert Israel, Oct 28 2020
Showing 1-6 of 6 results.