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

A037074 Numbers that are the product of a pair of twin primes.

Original entry on oeis.org

15, 35, 143, 323, 899, 1763, 3599, 5183, 10403, 11663, 19043, 22499, 32399, 36863, 39203, 51983, 57599, 72899, 79523, 97343, 121103, 176399, 186623, 213443, 272483, 324899, 359999, 381923, 412163, 435599, 656099, 675683, 685583, 736163
Offset: 1

Views

Author

Keywords

Comments

Each entry is the product of p and p+2 where both p and p+2 are prime, i.e., the product of the lesser and greater of a twin prime pair.
Except for the first term, all entries have digital root 8. - Lekraj Beedassy, Jun 11 2004
The above statement follows from p > 3 => (p,p+2) = (6k-1,6k+1) => p*(p+2) = 36k^2 - 1 == 8 (mod 9), and A010888 === A010878 (mod 9). - M. F. Hasler, Jan 11 2013
Albert A. Mullin states that m is a product of twin primes iff phi(m)*sigma(m) = (m-3)*(m+1), where phi(m) = A000010(m) and sigma(m) = A000203(m). Of course, for a product of distinct primes p*q we know sigma(p*q) = (p+1)*(q+1) and if p, q, are twin primes, say q = p + 2, then sigma(p*q) = (p+1)*(q+1) = (p+1)*(p+3). - Jonathan Vos Post, Feb 21 2006
Also the area of twin prime rectangles. A twin prime rectangle is a rectangle whose sides are components of twin prime pairs. E.g., the twin prime pair (3,5) produces a 3 X 5 unit rectangle which has area 15 square units. - Cino Hilliard, Jul 28 2006
Except for 15, a product of twin primes is of the form 36k^2 - 1 (cf. A136017, A002822). - Artur Jasinski, Dec 12 2007
A072965(a(n)) = 1; A072965(m) mod A037074(n) > 0 for all m. - Reinhard Zumkeller, Jan 29 2008
The number of terms less than 10^(2n) is A007508(n). - Robert G. Wilson v, Feb 08 2012
If m is the product of twin primes, then sigma(m) = m + 1 + 2*sqrt(m + 1), phi(m) = m + 1 - 2*sqrt(m + 1). pmin(m) = sqrt(m + 1) - 1, pmax(m) = sqrt(m + 1) + 1. - Wesley Ivan Hurt, Jan 06 2013
Semiprimes of the form 4*k^2 - 1. - Vincenzo Librandi, Apr 13 2013

Examples

			a(2)=35 because 5*7=35, that is (5,7) is the 2nd pair of twin primes.
		

References

  • Albert A. Mullin, "Bicomposites, twin primes and arithmetic progression", Abstract 04T-11-48, Abstracts of AMS, Vol. 25, No. 4, 2004, p. 795.

Crossrefs

Cf. A000010, A000203, A001359, A006512, A014574, A136017, A074480 (multiplicative closure), A209328.
Cf. A071700 (subsequence).
Cf. A075369.

Programs

  • Haskell
    a037074 = subtract 1 . a075369  -- Reinhard Zumkeller, Feb 10 2015
    -- Reinhard Zumkeller, Feb 10 2015, Aug 14 2011
  • Magma
    [p*(p+2): p in PrimesUpTo(1000) | IsPrime(p+2)];  // Bruno Berselli, Jul 08 2011
    
  • Magma
    IsSemiprime:=func; [s: n in [1..500] | IsSemiprime(s) where s is 4*n^2-1]; // Vincenzo Librandi, Apr 13 2013
    
  • Maple
    ZL:=[]: for p from 1 to 863 do if (isprime(p) and isprime(p+2) ) then ZL:=[op(ZL),(p*(p+2))]; fi; od; print(ZL); # Zerinvary Lajos, Mar 07 2007
    for i from 1 to 150 do if ithprime(i+1) = ithprime(i) + 2 then print({ithprime(i)*ithprime(i+1)}); fi; od; # Zerinvary Lajos, Mar 19 2007
  • Mathematica
    s = Select[ Prime@ Range@170, PrimeQ[ # + 2] &]; s(s + 2) (* Robert G. Wilson v, Feb 21 2006 *)
    (* For checking large numbers, the following code is better. For instance, we could use the fQ function to determine that 229031718473564142083 is in this sequence. *) fQ[n_] := Block[{fi = FactorInteger[n]}, Last@# & /@ fi == {1, 1} && Differences[ First@# & /@ fi] == {2}]; Select[ Range[750000], fQ] (* Robert G. Wilson v, Feb 08 2012 *)
    Times@@@Select[Partition[Prime[Range[500]],2,1],Last[#]-First[#]==2&] (* Harvey P. Dale, Oct 16 2012 *)
  • PARI
    g(n) = for(x=1,n,if(prime(x+1)-prime(x)==2,print1(prime(x)*prime(x+1)","))) \\ Cino Hilliard, Jul 28 2006
    

Formula

a(n) = A001359(n)*A006512(n). A000010(a(n))*A000203(a(n)) = (a(n)-3)*(a(n)+1). - Jonathan Vos Post, Feb 21 2006
a(n) = (A014574(n))^2 - 1. a(n+1) = (6*A002822(n))^2 - 1. - Lekraj Beedassy, Sep 02 2006
a(n) = A075369(n) - 1. - Reinhard Zumkeller, Feb 10 2015
Sum_{n>=1} 1/a(n) = A209328. - Amiram Eldar, Nov 20 2020
A000010(a(n)) == 0 (mod 8). - DarĂ­o Clavijo, Oct 26 2022

Extensions

More terms from Erich Friedman

A209329 Decimal expansion of the sum over the inverse products of adjacent odd primes.

Original entry on oeis.org

1, 3, 4, 4, 2, 6, 5, 0, 9, 6, 9, 1, 7, 3, 3, 2, 2, 8
Offset: 0

Views

Author

R. J. Mathar, Jan 19 2013

Keywords

Comments

Contains the contribution from twin primes (A209328) plus other contributions from cousin primes (A143206) not already part of twin primes, sexy primes (A210477) not already accounted for, etc.
Summing up to (and including) 12-digit primes yields 0.134426509691698261. - Hans Havermann, Mar 17 2013

Examples

			0.134426509... = 1/(3*5) + 1/(5*7) + 1/(7*11) + 1/(11*13)+ ... = Sum_{n>=2} 1/A006094(n).
		

Crossrefs

Cf. A210473 (includes 1/(2*3)). Cf. also A085548.

Programs

  • PARI
    {default(realprecision,19);s=0;q=1/3;forprime(p=1/q+1,10^9,s+=q*q=1./p);s} /* M. F. Hasler, Jan 22 2013 */

Formula

sum_{3 < p < 10^4} 1/(prevprime(p)*p) = 0.134416688[9]...
sum_{3 < p < 10^5} 1/(prevprime(p)*p) = 0.134425707...
sum_{3 < p < 10^6} 1/(prevprime(p)*p) = 0.1344264419...
sum_{3 < p < 10^7} 1/(prevprime(p)*p) = 0.13442650383...
sum_{3 < p < 10^8} 1/(prevprime(p)*p) = 0.13442650917[5]...
sum_{3 < p < 10^9} 1/(prevprime(p)*p) = 0.13442650964545...
Extrapolation of this data (using Aitken's method) indeed suggests a value of 0.134426509692, rounded to the last decimal place. Extrapolation of the ratios of the first differences (9.02e-6, 7.35e-7, 6.19e-8, 5.34e-9, 4.699e-10) yields subsequent terms (4.26e-11, 4.0e-12). - M. F. Hasler, Jan 22 2013

Extensions

More terms from R. J. Mathar, Feb 08 2013

A322358 Number of distinct twin prime pairs p, p+2 such that both of them divide n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 16 2018

Keywords

Examples

			For n = 45 = 3^2 * 5, there exists one twin prime pair (3,5) whose both members divide 45, thus a(45) = 1.
For n = 105 = 3 * 5 * 7, there exists two twin prime pairs, (3,5) and (5,7) whose both members divide 105, thus a(105) = 2.
		

Crossrefs

Programs

  • Mathematica
    f[p_, n_] := If[PrimeQ[p + 2] && Divisible[n, p*(p + 2)], 1, 0]; a[n_] := Plus @@ (f[#, n] & /@ FactorInteger[n][[;; , 1]]); Array[a, 105] (* Amiram Eldar, Dec 16 2018 *)
  • PARI
    A322358(n) = { my(ps=factor(n)[,1]~); sum(i=1,#ps,isprime(ps[i]+2)*!(n%(ps[i]+2))); };

Formula

a(n) = A001221(A322356(n)) = A001222(A322356(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A209328 = 0.107983... . - Amiram Eldar, Jan 01 2024

A356793 Decimal expansion of sum of squares of reciprocals of lesser twin primes, Sum_{j>=1} 1/(A001359(j))^2.

Original entry on oeis.org

1, 6, 5, 6, 1, 8, 4, 6, 5, 3, 9, 5
Offset: 0

Views

Author

Artur Jasinski, Sep 04 2022

Keywords

Comments

Alternative definition: sum of squares of reciprocals of primes whose distance from the next prime is equal to 2.
Convergence table:
k A001359(k) Sum_{j=1..k} 1/A001359(j)^2
10000000 3285916169 0.165618465394273171950874120818
20000000 7065898967 0.165618465394707600197099741096
30000000 11044807451 0.165618465394836120901019351544
40000000 15151463321 0.165618465394895965582366015390
50000000 19358093939 0.165618465394930089884704869090
60000000 23644223231 0.165618465394951950670948192842
Using the Hardy-Littlewood prediction of the density of twin primes (see A347278), the contribution to the sum after the last entry in the table above can be estimated as 9.056*10^(-14), making the infinite sum ~= 0.16561846539504... . - Hugo Pfoertner, Sep 28 2022

Examples

			0.165618465395...
		

Crossrefs

Extensions

Data extended to ...3, 9, 5 by Hugo Pfoertner, Sep 28 2022

A306539 Decimal expansion of Sum (1/p - 1/q) as (p, q) runs through the twin primes.

Original entry on oeis.org

2, 1, 5, 9, 6, 7, 9, 4, 9, 9, 0, 2, 3, 7, 4
Offset: 0

Views

Author

Dimitris Valianatos, Feb 22 2019

Keywords

Comments

If a = Sum (1/p) as (p, q) runs through the twin primes and
If b = Sum (1/q) as (p, q) runs through the twin primes, then
a + b = 1.902160583209... (Brun's constant) and
a - b = 0.215967949902374... (This constant).
So a = Sum_{n>=1} 1/A001359(n) = 1.059064266555685...
and b = Sum_{n>=1} 1/A006512(n) = 0.843096316653315... are 2 new constants for twin primes.

Examples

			0.215967949902374...
		

Crossrefs

Programs

  • PARI
    p=2;s=0.0;forprime(n=3,1e14,if(n-p==2,s+=(1/p-1/n));p=n;);print1(s)

Formula

Equals 2 * A209328. - Amiram Eldar, Nov 20 2020

A342714 Decimal expansion of infinite sum of reciprocals of lesser twin primes, Sum_{n>=1} 1/A001359(n).

Original entry on oeis.org

1, 0, 5, 9, 0, 6, 4, 2, 6
Offset: 1

Views

Author

Artur Jasinski, Mar 19 2021

Keywords

Comments

Alternative definition: infinite sum of reciprocals of primes whose distance to the next prime is equal to 2.
R. J. Mathar gave an estimate of 1.059064 for this constant in a comment at A209328. Dimitris Valianatos estimated the constant as 1.059064266555685... in a comment at A306539.

Examples

			Equals 1.05906426...
		

Crossrefs

Formula

Equals 1/3 + 1/5 + 1/11 + 1/17 + 1/29 + 1/41 + 1/59 + ...
Equals (A065421 + A306539)/2.

A357059 Decimal expansion of sum of squares of reciprocals of primes whose distance to the next prime is equal to 4, Sum_{j>=1} 1/A029710(j)^2.

Original entry on oeis.org

0, 3, 1, 3, 2, 1, 6, 2, 0, 6, 4, 6
Offset: 0

Views

Author

Artur Jasinski, Sep 10 2022

Keywords

Comments

Convergence table:
k A029710(k) Sum_{j=1..k} 1/A029710(j)^2
10000000 3285441223 0.031321620645456519799598611681
20000000 7067090263 0.031321620645890982910821292996
30000000 11044597393 0.031321620646019474620358985896
40000000 15153534937 0.031321620646079307404248696076
50000000 19360462153 0.031321620646113421819579063642
60000000 23647877233 0.031321620646135276227114122713
70000000 28000392817 0.031321620646150384406674037099

Examples

			0.031321620646...
		

Crossrefs

Programs

  • Mathematica
    aa = {}; Do[g1[2 n] = 0, {n, 1, 1000}]; Do[g2[2 n] = 0, {n, 1, 1000}]; Do[g3[2 n] = 0, {n, 1, 1000}]; Do[g4[2 n] = 0, {n, 1, 1000}]; Do[g[2 n] = 0, {n, 1, 1000}];
    w1 = 3; n = 3; Monitor[While[n < 10^10, w2 = NextPrime[w1]; kk = w2 - w1;
      If[kk < 2000, g[kk] = g[kk] + 1; g1[kk] = g1[kk] + N[1/w1, 1000];g2[kk] = g2[kk] + N[1/w1^2, 1000];g3[kk] = g3[kk] + N[1/w1^3, 1000];g4[kk] = g4[kk] + N[1/w1^4, 1000];
    If[IntegerQ[g[kk]/1000000], Print[{n, w1, kk, g[kk]}];If[kk == 4,AppendTo[aa, {n, w1, kk, g[kk], g1[kk], g2[kk], g3[kk], g4[kk]}]]]];w1 = w2; n++], n];aa

A380276 Decimal expansion of infinite sum of reciprocals Sum_{n>=1} 1/A357934(n).

Original entry on oeis.org

4, 7, 7, 9, 9, 9, 3
Offset: 0

Views

Author

Artur Jasinski, Jan 18 2025

Keywords

Comments

Sum of reciprocals of product of two distinct lesser twin primes.

Examples

			0.47799932... = 1/15 + 1/33 + 1/51 + 1/55 + 1/85 + 1/87 + ...
		

Crossrefs

Formula

Equals (A342714^2-A356793)/2.
Equals Sum_{m=2} 1/(A001359(m)*A001359(n)).
Showing 1-8 of 8 results.