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-10 of 108 results. Next

A099609 Naive list of twin primes (A077800 prefixed by 2, 3).

Original entry on oeis.org

2, 3, 3, 5, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 59, 61, 71, 73, 101, 103, 107, 109, 137, 139, 149, 151, 179, 181, 191, 193, 197, 199, 227, 229, 239, 241, 269, 271, 281, 283, 311, 313, 347, 349, 419, 421, 431, 433, 461, 463, 521, 523, 569, 571, 599, 601, 617, 619, 641
Offset: 1

Views

Author

N. J. A. Sloane, Nov 18 2004

Keywords

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.

Crossrefs

Cf. A070076, A077800. See A001097 for another version.

Programs

  • Mathematica
    Select[Partition[#, 2, 1] &@ Prime@ Range@ 120, First@ Differences@ # <= 2 &] // Flatten (* Michael De Vlieger, Mar 18 2017 *)

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

Original entry on oeis.org

1, 8, 11, 92, 1117, 15676, 281507, 5603888, 167362597, 5328886012, 222844337147, 9761066934176, 583589647901149, 36052483750271224, 2587390775195626139, 190843701043052923832, 19418598540473717052037
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 13 2002

Keywords

Comments

a(n)/A074043(n) -> Brun's constant (A065421).

Extensions

Definition corrected by Max Alekseyev, May 10 2009

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

A176813 Numbers n such that 3*A077800(2n-1)

Original entry on oeis.org

1, 2, 7, 18, 60, 82, 149, 228, 229, 268, 325, 340, 372, 479, 508, 510, 515, 518, 619, 622, 710, 743, 790, 892, 910, 955, 998, 1020, 1158, 1184, 1215, 1266, 1310, 1363, 1431, 1478, 1567, 1885, 1921, 1979, 2066, 2316, 2476, 2541, 2688, 2704, 2781, 2798, 2809
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 26 2010

Keywords

Comments

Indices n of lower twin primes A001359(n) such that both members of some twin prime pair (p,p+2) are inside the open interval (3*A001359(n),3*A006512(n)). [R. J. Mathar, May 10 2010]

Examples

			a(1)=1 because 3*A077800(2*1-1)=9<11 and 11+2<3*A077800(2*1)=15;
a(2)=2 because 3*A077800(2*2-1)=15<17 and 17+2<3*A077800(2*2)=21;
a(3)=7 because 3*A077800(2*7-1)=177<179 and 179+2<3*A077800(2*7)=183;
a(4)=18 because 3*A077800(2*18-1)=807<809 and 809+2<3*A077800(2*18)=813;
a(5)=60 because 3*A077800(2*60-1)=5847<5849 and 5849+2<3*A077800(2*60)=5853.
		

Extensions

Extended beyond 60 by R. J. Mathar, May 10 2010

A347359 Decimal expansion of Product_{p in A077800} (1 - 1/p).

Original entry on oeis.org

1, 2, 9, 3, 3, 7, 1, 7
Offset: 0

Views

Author

Kenneth H. Hicks, Aug 29 2021

Keywords

Comments

Note that A077800 is the sequence of twin primes with 5 repeated. The sequence of twin primes is A001097.
Related to Brun's constant (A065421) and the twin prime constant (A005597).
It is well known that the product of 1-1/p over all primes p is zero (it is related to the Riemann zeta function). Also the sum of 1/p diverges, whereas the sum of 1/p2 for p2 in the sequence A077800 converges to Brun's constant, regardless of whether there are an infinite number of twin primes or not. Similarly, the product in the present sequence also converges.
The repeated value of 1/5 is used in the calculation of Brun's constant (A065421) and we follow that convention here. The first two pairs of twin primes are (3,5) and (5,7), so the 4 initial terms in the product are (1-1/3)*(1-1/5)*(1-1/5)*(1-1/7).
This constant converges very slowly, similar to the convergence of Brun's constant. For example, for all twin primes below 1 billion, the product only reaches the value of 0.1469... Details on the error term in the convergence of the above product will be given in a forthcoming paper.

Examples

			0.12933717...
		

References

  • K. Hicks and K. Ward, Series and Product Relations Made from Primes, Pi Mu Epsilon Journal, Vol. 15, No. 3, Fall 2020, pp. 161-169.

Crossrefs

Extensions

Offset corrected by N. J. A. Sloane, Sep 20 2021

A001359 Lesser of twin primes.

Original entry on oeis.org

3, 5, 11, 17, 29, 41, 59, 71, 101, 107, 137, 149, 179, 191, 197, 227, 239, 269, 281, 311, 347, 419, 431, 461, 521, 569, 599, 617, 641, 659, 809, 821, 827, 857, 881, 1019, 1031, 1049, 1061, 1091, 1151, 1229, 1277, 1289, 1301, 1319, 1427, 1451, 1481, 1487, 1607
Offset: 1

Views

Author

Keywords

Comments

Also, solutions to phi(n + 2) = sigma(n). - Conjectured by Jud McCranie, Jan 03 2001; proved by Reinhard Zumkeller, Dec 05 2002
The set of primes for which the weight as defined in A117078 is 3 gives this sequence except for the initial 3. - Rémi Eismann, Feb 15 2007
The set of lesser of twin primes larger than three is a proper subset of the set of primes of the form 3n - 1 (A003627). - Paul Muljadi, Jun 05 2008
It is conjectured that A113910(n+4) = a(n+2) for all n. - Creighton Dement, Jan 15 2009
I would like to conjecture that if f(x) is a series whose terms are x^n, where n represents the terms of sequence A001359, and if we inspect {f(x)}^5, the conjecture is that every term of the expansion, say a_n * x^n, where n is odd and at least equal to 15, has a_n >= 1. This is not true for {f(x)}^k, k = 1, 2, 3 or 4, but appears to be true for k >= 5. - Paul Bruckman (pbruckman(AT)hotmail.com), Feb 03 2009
A164292(a(n)) = 1; A010051(a(n) - 2) = 0 for n > 1. - Reinhard Zumkeller, Mar 29 2010
From Jonathan Sondow, May 22 2010: (Start)
About 15% of primes < 19000 are the lesser of twin primes. About 26% of Ramanujan primes A104272 < 19000 are the lesser of twin primes.
About 46% of primes < 19000 are Ramanujan primes. About 78% of the lesser of twin primes < 19000 are Ramanujan primes.
A reason for the jumps is in Section 7 of "Ramanujan primes and Bertrand's postulate" and in Section 4 of "Ramanujan Primes: Bounds, Runs, Twins, and Gaps". (End)
Primes generated by sequence A040976. - Odimar Fabeny, Jul 12 2010
Primes of the form 2*n - 3 with 2*n - 1 prime n > 2. Primes of the form (n^2 - (n-2)^2)/2 - 1 with (n^2 - (n-2)^2)/2 + 1 prime so sum of two consecutive odd numbers/2 - 1. - Pierre CAMI, Jan 02 2012
Conjecture: For any integers n >= m > 0, there are infinitely many integers b > a(n) such that the number Sum_{k=m..n} a(k)*b^(n-k) (i.e., (a(m), ..., a(n)) in base b) is prime; moreover, when m = 1 there is such an integer b < (n+6)^2. - Zhi-Wei Sun, Mar 26 2013
Except for the initial 3, all terms are congruent to 5 mod 6. One consequence of this is that no term of this sequence appears in A030459. - Alonso del Arte, May 11 2013
Aside from the first term, all terms have digital root 2, 5, or 8. - J. W. Helkenberg, Jul 24 2013
The sequence provides all solutions to the generalized Winkler conjecture (A051451) aside from all multiples of 6. Specifically, these solutions start from n = 3 as a(n) - 3. This gives 8, 14, 26, 38, 56, ... An example from the conjecture is solution 38 from twin prime pairs (3, 5), (41, 43). - Bill McEachen, May 16 2014
Conjecture: a(n)^(1/n) is a strictly decreasing function of n. Namely a(n+1)^(1/(n+1)) < a(n)^(1/n) for all n. This conjecture is true for all a(n) <= 1121784847637957. - Jahangeer Kholdi and Farideh Firoozbakht, Nov 21 2014
a(n) are the only primes, p(j), such that (p(j+m) - p(j)) divides (p(j+m) + p(j)) for some m > 0, where p(j) = A000040(j). For all such cases m=1. It is easy to prove, for j > 1, the only common factor of (p(j+m) - p(j)) and (p(j+m) + p(j)) is 2, and there are no common factors if j = 1. Thus, p(j) and p(j+m) are twin primes. Also see A067829 which includes the prime 3. - Richard R. Forberg, Mar 25 2015
Primes prime(k) such that prime(k)! == 1 (mod prime(k+1)) with the exception of prime(991) = 7841 and other unknown primes prime(k) for which (prime(k)+1)*(prime(k)+2)*...*(prime(k+1)-2) == 1 (mod prime(k+1)) where prime(k+1) - prime(k) > 2. - Thomas Ordowski and Robert Israel, Jul 16 2016
For the twin prime criterion of Clement see the link. In Ribenboim, pp. 259-260 a more detailed proof is given. - Wolfdieter Lang, Oct 11 2017
Conjecture: Half of the twin prime pairs can be expressed as 8n + M where M > 8n and each value of M is a distinct composite integer with no more than two prime factors. For example, when n=1, M=21 as 8 + 21 = 29, the lesser of a twin prime pair. - Martin Michael Musatov, Dec 14 2017
For a discussion of bias in the distribution of twin primes, see my article on the Vixra web site. - Waldemar Puszkarz, May 08 2018
Since 2^p == 2 (mod p) (Fermat's little theorem), these are primes p such that 2^p == q (mod p), where q is the next prime after p. - Thomas Ordowski, Oct 29 2019, edited by M. F. Hasler, Nov 14 2019
The yet unproved "Twin Prime Conjecture" states that this sequence is infinite. - M. F. Hasler, Nov 14 2019
Lesser of the twin primes are the set of elements that occur in both A162566, A275697. Proof: A prime p will only have integer solutions to both (p+1)/g(p) and (p-1)/g(p) when p is the lesser of a twin prime, where g(p) is the gap between p and the next prime, because gcd(p+1,p-1) = 2. - Ryan Bresler, Feb 14 2021
From Lorenzo Sauras Altuzarra, Dec 21 2021: (Start)
J. A. Hervás Contreras observed the subsequence 11, 311, 18311, 1518311, 421518311... (see the links), which led me to conjecture the following statements.
I. If i is an integer greater than 2, then there exist positive integers j and k such that a(j) equals the concatenation of 3k and a(i).
II. If k is a positive integer, then there exist positive integers i and j such that a(j) equals the concatenation of 3k and a(i).
III. If i, j, and r are positive integers such that i > 2 and a(j) equals the concatenation of r and a(i), then 3 divides r. (End)

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 6.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, p. 81.
  • Paulo Ribenboim, The New Book of Prime Number Records, Springer-Verlag NY 1996, pp. 259-260.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 192-197.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 111-112.

Crossrefs

Subsequence of A003627.
Cf. A104272 (Ramanujan primes), A178127 (lesser of twin Ramanujan primes), A178128 (lesser of twin primes if it is a Ramanujan prime).

Programs

  • Haskell
    a001359 n = a001359_list !! (n-1)
    a001359_list = filter ((== 1) . a010051' . (+ 2)) a000040_list
    -- Reinhard Zumkeller, Feb 10 2015
    
  • Magma
    [n: n in PrimesUpTo(1610) | IsPrime(n+2)];  // Bruno Berselli, Feb 28 2011
    
  • Maple
    select(k->isprime(k+2),select(isprime,[$1..1616])); # Peter Luschny, Jul 21 2009
    A001359 := proc(n)
       option remember;
       if n = 1
          then 3;
       else
          p := nextprime(procname(n-1)) ;
          while not isprime(p+2) do
             p := nextprime(p) ;
          end do:
          p ;
       end if;
    end proc: # R. J. Mathar, Sep 03 2011
  • Mathematica
    Select[Prime[Range[253]], PrimeQ[# + 2] &] (* Robert G. Wilson v, Jun 09 2005 *)
    a[n_] := a[n] = (p = NextPrime[a[n - 1]]; While[!PrimeQ[p + 2], p = NextPrime[p]]; p); a[1] = 3; Table[a[n], {n, 51}]  (* Jean-François Alcover, Dec 13 2011, after R. J. Mathar *)
    nextLesserTwinPrime[p_Integer] := Block[{q = p + 2}, While[NextPrime@ q - q > 2, q = NextPrime@ q]; q]; NestList[nextLesserTwinPrime@# &, 3, 50] (* Robert G. Wilson v, May 20 2014 *)
    Select[Partition[Prime[Range[300]],2,1],#[[2]]-#[[1]]==2&][[All,1]] (* Harvey P. Dale, Jan 04 2021 *)
    q = Drop[Prepend[p = Prime[Range[100]], 2], -1];
    Flatten[q[[#]] & /@ Position[p - q, 2]] (* Horst H. Manninger, Mar 28 2021 *)
  • PARI
    A001359(n,p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0,); p-2}
    /* The following gives a reasonably good estimate for any value of n from 1 to infinity; compare to A146214. */
    A001359est(n) = solve( x=1,5*n^2/log(n+1), 1.320323631693739*intnum(t=2.02,x+1/x,1/log(t)^2)-log(x) +.5 - n)
    /* The constant is A114907; the expression in front of +.5 is an estimate for A071538(x) */ \\  M. F. Hasler, Dec 10 2008
    
  • Python
    from sympy import primerange, isprime
    print([n for n in primerange(1, 2001) if isprime(n + 2)]) # Indranil Ghosh, Jul 20 2017

Formula

a(n) = A077800(2n-1).
A001359 = { n | A071538(n-1) = A071538(n)-1 }; A071538(A001359(n)) = n. - M. F. Hasler, Dec 10 2008
A001359 = { prime(n) : A069830(n) = A087454(n) }. - Juri-Stepan Gerasimov, Aug 23 2011
a(n) = prime(A029707(n)). - R. J. Mathar, Feb 19 2017

A006512 Greater of twin primes.

Original entry on oeis.org

5, 7, 13, 19, 31, 43, 61, 73, 103, 109, 139, 151, 181, 193, 199, 229, 241, 271, 283, 313, 349, 421, 433, 463, 523, 571, 601, 619, 643, 661, 811, 823, 829, 859, 883, 1021, 1033, 1051, 1063, 1093, 1153, 1231, 1279, 1291, 1303, 1321, 1429, 1453, 1483, 1489, 1609
Offset: 1

Views

Author

Keywords

Comments

Also primes that are the sum of two primes (which is possible only if 2 is one of the primes). - Cino Hilliard, Jul 02 2004, edited by M. F. Hasler, Nov 14 2019
The set of greater of twin primes larger than five is a proper subset of the set of primes of the form 3n + 1 (A002476). - Paul Muljadi, Jun 05 2008
Smallest prime > n-th isolated composite. - Juri-Stepan Gerasimov, Nov 07 2009
Subsequence of A175075. Union of a(n) and sequence A175080 is A175075. - Jaroslav Krizek, Jan 30 2010
A164292(a(n))=1; A010051(a(n)+2)=0 for n > 1. - Reinhard Zumkeller, Mar 29 2010
Omega(n) = Omega(n-2); d(n) = d(n-2). - Juri-Stepan Gerasimov, Sep 19 2010
Aside from the first term, all subsequent terms have digital root 1, 4, or 7. - J. W. Helkenberg, Jul 24 2013
Also primes p with property that the sum of the successive gaps between primes <= p is a prime number. - Robert G. Wilson v, Dec 19 2014
The phrase "x is an element of the {primes, positive integers} and there {exist no, exist} elements a,b of {1 and primes, primes}: a+b=x" determines A133410, A067829, A025584, A006512, A166081, A014092, A014091 and A038609 for the first few hundred terms with only de-duplication or omitting/including 3, 4 and 6 in the case of A166081/A014091 and one case of omitting/including 3 given 1 isn't prime. - Harry G. Coin, Nov 25 2015
The yet unproved Twin Prime Conjecture states that this sequence is infinite. - M. F. Hasler, Nov 14 2019

References

  • See A001359 for further references and links.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A139690.
Bisection of A077800.

Programs

  • Haskell
    a006512 = (+ 2) . a001359 -- Reinhard Zumkeller, Feb 10 2015
    
  • Magma
    [n: n in PrimesUpTo(1610)|IsPrime(n-2)]; // Bruno Berselli, Feb 28 2011
    
  • Maple
    for i from 1 to 253 do if ithprime(i+1) = ithprime(i) + 2 then print({ithprime(i+1)}); fi; od; # Zerinvary Lajos, Mar 19 2007
    P := select(isprime,[$1..1609]): select(p->member(p-2,P),P); # Peter Luschny, Mar 03 2011
    A006512 := proc(n)
        2+A001359(n) ;
    end proc: # R. J. Mathar, Nov 26 2014
  • Mathematica
    Select[Prime[Range[254]], PrimeQ[# - 2] &] (* Robert G. Wilson v, Jun 09 2005 *)
    Transpose[Select[Partition[Prime[Range[300]], 2, 1], Last[#] - First[#] == 2 &]][[2]] (* Harvey P. Dale, Nov 02 2011 *)
    Cases[Prime[Range[500]] + 2, ?PrimeQ] (* _Fred Patrick Doty, Aug 23 2017 *)
  • PARI
    select(p->isprime(p-2),primes(1000))
    
  • PARI
    a(n)=p=3; while(p+2 < (p=nextprime(p+1)) || n-->0, ); p
    vector(100, n, a(n)) \\ Altug Alkan, Dec 04 2015
    
  • Python
    from sympy import primerange, isprime
    print([n for n in primerange(1, 2001) if isprime(n - 2)]) # Indranil Ghosh, Jul 20 2017

A014574 Average of twin prime pairs.

Original entry on oeis.org

4, 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150, 180, 192, 198, 228, 240, 270, 282, 312, 348, 420, 432, 462, 522, 570, 600, 618, 642, 660, 810, 822, 828, 858, 882, 1020, 1032, 1050, 1062, 1092, 1152, 1230, 1278, 1290, 1302, 1320, 1428, 1452, 1482, 1488, 1608
Offset: 1

Views

Author

Keywords

Comments

With an initial 1 added, this is the complement of the closure of {2} under a*b+1 and a*b-1. - Franklin T. Adams-Watters, Jan 11 2006
Also the square root of the product of twin prime pairs + 1. Two consecutive odd numbers can be written as 2k+1,2k+3. Then (2k+1)(2k+3)+1 = 4(k^2+2k+1) = 4(k+1)^2, a perfect square. Since twin prime pairs are two consecutive odd numbers, the statement is true for all twin prime pairs. - Cino Hilliard, May 03 2006
Or, single (or isolated) composites. Nonprimes k such that neither k-1 nor k+1 is nonprime. - Juri-Stepan Gerasimov, Aug 11 2009
Numbers n such that sigma(n-1) = phi(n+1). - Farideh Firoozbakht, Jul 04 2010
Aside from the first term in the sequence, all remaining terms have digital root 3, 6, or 9. - J. W. Helkenberg, Jul 24 2013
Numbers n such that n^2-1 is a semiprime. - Thomas Ordowski, Sep 24 2015
Every term but the first is a multiple of 6. - Harvey P. Dale, Mar 31 2023

References

  • Archimedeans Problems Drive, Eureka, 30 (1967).

Crossrefs

A068507 is the intersection of A002182 and this sequence.

Programs

  • GAP
    a:=1+Filtered([1..2000],p->IsPrime(p) and IsPrime(p+2)); # Muniru A Asiru, May 20 2018
  • Haskell
    a014574 n = a014574_list !! (n-1)
    a014574_list = [x | x <- [2,4..], a010051 (x-1) == 1, a010051 (x+1) == 1]
    -- Reinhard Zumkeller, Apr 11 2012
    
  • Maple
    P := select(isprime,[$1..1609]): map(p->p+1,select(p->member(p+2,P),P)); # Peter Luschny, Mar 03 2011
    A014574 := proc(n) option remember; local p ; if n = 1 then 4 ; else p := nextprime( procname(n-1) ) ; while not isprime(p+2) do p := nextprime(p) ; od ; return p+1 ; end if ; end proc: # R. J. Mathar, Jun 11 2011
  • Mathematica
    Select[Table[Prime[n] + 1, {n, 260}], PrimeQ[ # + 1] &] (* Ray Chandler, Oct 12 2005 *)
    Mean/@Select[Partition[Prime[Range[300]],2,1],Last[#]-First[#]==2&] (* Harvey P. Dale, Jan 16 2014 *)
  • Maxima
    A014574(n) := block(
        if n = 1 then
            return(4),
        p : A014574(n-1) ,
        for k : 2 step 2 do (
            if primep(p+k-1) and primep(p+k+1) then
                return(p+k)
        )
    )$ /* R. J. Mathar, Mar 15 2012 */
    
  • PARI
    p=2;forprime(q=3,1e4,if(q-p==2,print1(p+1", "));p=q) \\ Charles R Greathouse IV, Jun 10 2011
    

Formula

a(n) = (A001359(n) + A006512(n))/2 = 2*A040040(n) = A054735(n)/2 = A111046(n)/4.
a(n) = A129297(n+4). - Reinhard Zumkeller, Apr 09 2007
A010051(a(n) - 1) * A010051(a(n) + 1) = 1. Reinhard Zumkeller, Apr 11 2012
a(n) = 6*A002822(n-1), n>=2. - Ivan N. Ianakiev, Aug 19 2013
a(n)^4 - 4*a(n)^2 = A062354(a(n)^2 - 1). - Raphie Frank, Oct 17 2013

Extensions

Offset changed to 1 by R. J. Mathar, Jun 11 2011

A001097 Twin primes.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 59, 61, 71, 73, 101, 103, 107, 109, 137, 139, 149, 151, 179, 181, 191, 193, 197, 199, 227, 229, 239, 241, 269, 271, 281, 283, 311, 313, 347, 349, 419, 421, 431, 433, 461, 463, 521, 523, 569, 571, 599, 601, 617, 619, 641, 643
Offset: 1

Views

Author

N. J. A. Sloane, Mar 15 1996

Keywords

Comments

Union of A001359 and A006512.
The only twin primes that are Fibonacci numbers are 3, 5 and 13 [MacKinnon]. - Emeric Deutsch, Apr 24 2005
(p, p+2) are twin primes if and only if p + 2 can be represented as the sum of two primes. Brun (1919): Even if there are infinitely many twin primes, the series of all twin prime reciprocals does converges to [Brun's constant] (A065421). Clement (1949): For every n > 1, (n, n+2) are twin primes if and only if 4((n-1)! + 1) == -n (mod n(n+2)). - Stefan Steinerberger, Dec 04 2005
A164292(a(n)) = 1. - Reinhard Zumkeller, Mar 29 2010
The 100355-digit numbers 65516468355 * 2^333333 +- 1 are currently the largest known twin prime pair. They were discovered by Twin Prime Search and Primegrid in August 2009. - Paul Muljadi, Mar 07 2011
For every n > 2, the pair (n, n+2) is a twin prime if and only if ((n-1)!!)^4 == 1 (mod n*(n+2)). - Thomas Ordowski, Aug 15 2016
The term "twin primes" ("primzahlzwillinge", in German) was coined by the German mathematician Paul Gustav Samuel Stäckel (1862-1919) in 1916. Brun (1919) used the same term in French ("nombres premiers jumeaux"). Glaisher (1878) and Hardy and Littlewood (1923) used the term "prime-pairs". The term "twin primes" in English was used by Dantzig (1930). - Amiram Eldar, May 20 2023

References

  • Tobias Dantzig, Number: The Language of Science, Macmillan, 1930.
  • Paulo Ribenboim, The New Book of Prime Number Records, Springer-Verlag, 1996, pp. 259-265.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 132.

Crossrefs

Cf. A070076, A001359, A006512, A164292. See A077800 for another version.

Programs

  • Haskell
    a001097 n = a001097_list !! (n-1)
    a001097_list = filter ((== 1) . a164292) [1..]
    -- Reinhard Zumkeller, Feb 03 2014, Nov 27 2011
    
  • Maple
    A001097 := proc(n)
        option remember;
        if n = 1 then
            3;
        else
            for a from procname(n-1)+1 do
                if isprime(a) and ( isprime(a-2) or isprime(a+2) ) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Feb 19 2015
  • Mathematica
    Select[ Prime[ Range[120]], PrimeQ[ # - 2] || PrimeQ[ # + 2] &] (* Robert G. Wilson v, Jun 09 2005 *)
    Union[Flatten[Select[Partition[Prime[Range[200]],2,1],#[[2]]-#[[1]] == 2&]]] (* Harvey P. Dale, Aug 19 2015 *)
  • PARI
    isA001097(n) = (isprime(n) && (isprime(n+2) || isprime(n-2))) \\ Michael B. Porter, Oct 29 2009
    
  • PARI
    a(n)=if(n==1,return(3));my(p);forprime(q=3,default(primelimit), if(q-p==2 && (n-=2)<0, return(if(n==-1,q,p)));p=q) \\ Charles R Greathouse IV, Aug 22 2012
    
  • PARI
    list(lim)=my(v=List([3]),p=5); forprime(q=7,lim, if(q-p==2, listput(v,p); listput(v,q)); p=q); if(p+2>lim && isprime(p+2), listput(v,p)); Vec(v) \\ Charles R Greathouse IV, Mar 17 2017
    
  • Python
    from sympy import nextprime
    from itertools import islice
    def agen(): # generator of terms
        yield 3
        p, q = 5, 7
        while True:
            if q - p == 2: yield from [p, q]
            p, q = q, nextprime(q)
    print(list(islice(agen(), 58))) # Michael S. Branicky, Apr 30 2022

A065421 Decimal expansion of Viggo Brun's constant B, also known as the twin primes constant B_2: Sum (1/p + 1/q) as (p,q) runs through the twin primes.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Sep 08 2000

Keywords

Comments

The calculation of Brun's constant is "based on heuristic considerations about the distribution of twin primes" (Ribenboim, 1989).
Another constant related to the twin primes is the twin primes constant C_2 (sometimes also denoted PI_2) A005597 defined in connection with the Hardy-Littlewood conjecture concerning the distribution pi_2(x) of the twin primes.
Comment from Hans Havermann, Aug 06 2018: "I don't think the last three (or possibly even four) OEIS terms [he is referring to the sequence at that date - it has changed since then] are necessarily warranted. P. Sebah (see link below) (http://numbers.computation.free.fr/Constants/Primes/twin.html) gives 1.902160583104... as the value for primes to 10^16 followed by a suggestion that the (final) value 'should be around 1.902160583...'" - added by N. J. A. Sloane, Aug 06 2018

Examples

			(1/3 + 1/5) + (1/5 + 1/7) + (1/11 + 1/13) + ... = 1.902160583209 +- 0.000000000781 [Nicely]
		

References

  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 14.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 133-135.
  • Paulo Ribenboim, The Book of Prime Number Records, 2nd. ed., Springer-Verlag, New York, 1989, p. 201.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 193.

Crossrefs

Cf. A005597 (twin prime constant Product_{ p prime >= 3 } (1-1/(p-1)^2)).
Cf. A077800 (twin primes).

Formula

Equals Sum_{n>=1} 1/A077800(n).
From Dimitris Valianatos, Dec 21 2013: (Start)
(1/5) + Sum_{n>=1, excluding twin primes 3,5,7,11,13,...} mu(n)/n =
(1/5) + 1 - 1/2 + 1/6 + 1/10 + 1/14 + 1/15 + 1/21 + 1/22 - 1/23 + 1/26 - 1/30 + 1/33 + 1/34 + 1/35 - 1/37 + 1/38 + 1/39 - 1/42 ... = 1.902160583... (End)

Extensions

Corrected by N. J. A. Sloane, Nov 16 2001
More terms computed by Pascal Sebah (pascal_sebah(AT)ds-fr.com), Jul 15 2001
Further terms computed by Pascal Sebah (psebah(AT)yahoo.fr), Aug 22 2002
Commented and edited by Daniel Forgues, Jul 28 2009
Commented and reference added by Jonathan Sondow, Nov 26 2010
Unsound terms after a(9) removed by Gord Palameta, Sep 06 2018
Showing 1-10 of 108 results. Next