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 43 results. Next

A114907 Decimal expansion of twice the twin primes constant defined in A005597.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Jan 06 2006

Keywords

Examples

			1.320323631693739147855624220...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 2.1, p. 85.

Crossrefs

Cf. A005597.

Programs

  • PARI
    2 * prodeulerrat(1-1/(p-1)^2, 1, 3) \\ Amiram Eldar, Mar 16 2021

Formula

Equals 2*A005597 (in the sense of the corresponding decimal numbers).

Extensions

Corrected offset and edited by M. F. Hasler, Dec 09 2008

A347278 First member p(m) of the m-th twin prime pair such that d(m) > 0 and d(m-1) < 0, with d(k) = k/Integral_{x=2..p(k)} 1/log(x)^2 dx - C, C = 2*A005597 = A114907.

Original entry on oeis.org

1369391, 1371989, 1378217, 1393937, 1418117, 1426127, 1428767, 1429367, 1430291, 1494509, 1502141, 1502717, 1506611, 1510307, 35278697, 35287001, 35447171, 35468429, 35468861, 35470271, 35595869, 45274121, 45276227, 45304157, 45306827, 45324569, 45336461, 45336917
Offset: 1

Views

Author

Hugo Pfoertner, Aug 26 2021

Keywords

Comments

The sequence gives the positions, expressed by A001359(m), where the number of twin prime pairs m seen so far first exceeds the number predicted by the first Hardy-Littlewood conjecture after having been less than the predicted number before. A347279 gives the transitions in the opposite direction.
The total number of twin prime pairs up to that with first member x in the intervals a(k) <= x < A347279(k) is above the Hardy-Littlewood prediction. The total number of twin prime pairs up to that with first member x in the intervals A347279(k) <= x < a(k+1) is below the H-L prediction.

Crossrefs

a(1) = A210439(2) (Skewes number for twin primes).

Programs

  • PARI
    halicon(h) = {my(w=Set(vecsort(h)), n=#w, wmin=vecmin(w), distres(v,p)=#Set(v%p)); for(k=1,n, w[k]=w[k]-wmin); my(plim=nextprime(vecmax(w))); prodeuler(p=2, plim, (1-distres(w,p)/p)/(1-1/p)^n) * prodeulerrat((1-n/p)/(1-1/p)^n, 1, nextprime(plim+1))}; \\ k-tuple constant
    Li(x, n)=intnum(t=2, n, 1/log(t)^x); \\ logarithmic integral
    a347278(nterms,CHL)={my(n=1,pprev=1,np=0); forprime(p=5,, if(p%6!=1&&ispseudoprime(p+2), n++; L=Li(2,p); my(x=n/L-CHL); if(x*pprev>0, if(pprev>0,print1(p,", ");np++; if(np>nterms,return)); pprev=-pprev)))};
    a347278(10,halicon([0,2])) \\ computing 30 terms takes about 5 minutes

A347279 First member p(m) of the m-th twin prime pair such that d(m) < 0 and d(m-1) > 0, with d(k) = k/Integral_{x=2..p(k)} 1/log(x)^2 dx - C, C = 2*A005597 = A114907.

Original entry on oeis.org

1371911, 1372757, 1393919, 1417991, 1425881, 1428671, 1429247, 1429859, 1430711, 1495379, 1502687, 1503317, 1510217, 35278601, 35280029, 35446781, 35463497, 35468789, 35469779, 35472137, 45225161, 45274751, 45276689, 45306641, 45324551, 45336407, 45336761, 45337517
Offset: 1

Views

Author

Hugo Pfoertner, Aug 26 2021

Keywords

Comments

See A347278 for more information.

Crossrefs

Programs

  • PARI
    \\ see A347278 for auxiliary functions halicon and Li.
    a347279(nterms,CHL) = {my(n=2,pprev=1,np=0);
    forprime(p=11,, if(p%6!=1&&ispseudoprime(p+2), n++; L=Li(2,p); my(x=n/L-CHL); if(x*pprev>0, if(pprev<0,print1(p,", "); np++; if(np>nterms,return)); pprev=-pprev)))};
    a347279(10, halicon([0,2]))

Formula

A347278(n) < a(n) < A347278(n+1).

A065426 Incrementally larger terms in the continued fraction (A065645) for the twin prime constant (A005597).

Original entry on oeis.org

0, 1, 16, 18, 21, 405, 1199, 2301, 19965
Offset: 1

Views

Author

Robert G. Wilson v, Nov 15 2001

Keywords

Crossrefs

Cf. A005597 and A065645.

Programs

  • Mathematica
    (* tpc copied from Niklasch reference *)
    cof = ContinuedFraction[tpc, 969]; a = -1; k = 1; Do[ While[ cof[[k]] <= a, k++ ]; a = cof[[k]]; Print[a], {n, 1, 9} ]
  • PARI
    \\ Increasing lprec to 30000 gives no further term beyond 19965.
    a065246(lprec) = {localprec(lprec); my (m=-1, T=prodeulerrat(1-1/(p-1)^2, 1, 3), c=contfrac(T)); for (k=1, #c, if (c[k]>m, print(c[k],", "); m=c[k]))};
    a065246(1000) \\ Hugo Pfoertner, Aug 01 2023

A238734 Log of twice the twin prime constant, C_2, log(2*A005597).

Original entry on oeis.org

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

Views

Author

John W. Nicholson, Mar 03 2014

Keywords

Comments

The value occurs as term in equation (15) in the Wolf paper. - Ralf Stephan, Mar 28 2014

Examples

			0.2778768820732319619323108667032534203602062941473682988245270533677164980...
		

Crossrefs

Programs

  • Mathematica
    digits = 113;
    s[n_] := (1/n)*N[Sum[MoebiusMu[d]*2^(n/d), {d, Divisors[n]}], digits + 50];
    C2 = (175/256)*Product[(Zeta[n]*(1 - 2^(-n))*(1 - 3^(-n))*(1 - 5^(-n))*(1 - 7^(-n)))^(-s[n]), {n, 2, digits + 50}];
    RealDigits[Log[2 C2]][[1]][[1 ;; digits]] (* Jean-François Alcover, Feb 16 2019 *)
  • PARI
    default(realprecision,1000);
    result={175/256*prod(k=2, 500, (zeta(k)*(1-1/2^k)*(1-1/3^k)*(1-1/5^k)*(1-1/7^k))^(-sumdiv(k, d, moebius(d)*2^(k/d))/k))};log(2*result)
    
  • PARI
    log(2 * prodeulerrat(1-1/(p-1)^2, 1, 3)) \\ Amiram Eldar, Mar 16 2021

Formula

Equals log(2*A005597).

A378482 Decimal expansion of 1/(8*log(2)*A005597), where A005597 is the twin prime constant C_2.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Nov 28 2024

Keywords

Examples

			0.27317072236263839747106601431655151479129736936570...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 2.5.1, p. 111.
  • Gérald Tenenbaum, Introduction to analytic and probabilistic number theory, Cambridge University Press, 1995, p. 53, exercise 5 (in the third edition 2015, p. 59, exercise 57).

Crossrefs

Programs

  • PARI
    1/(8*log(2)*prodeulerrat(1-1/(p-1)^2, 1, 3)) \\ Amiram Eldar, Nov 29 2024

Formula

Equals lim_{n->oo} (1/(n*log(n)^2)) * A069205(n). - Amiram Eldar, Feb 15 2025

A005385 Safe primes p: (p-1)/2 is also prime.

Original entry on oeis.org

5, 7, 11, 23, 47, 59, 83, 107, 167, 179, 227, 263, 347, 359, 383, 467, 479, 503, 563, 587, 719, 839, 863, 887, 983, 1019, 1187, 1283, 1307, 1319, 1367, 1439, 1487, 1523, 1619, 1823, 1907, 2027, 2039, 2063, 2099, 2207, 2447, 2459, 2579, 2819, 2879, 2903, 2963
Offset: 1

Views

Author

Keywords

Comments

Then (p-1)/2 is called a Sophie Germain prime: see A005384.
Or, primes of the form 2p+1 where p is prime.
Primes p such that denominator(Bernoulli(p-1) + 1/p) = 6. - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Feb 10 2004
Primes p such that p-1 is a semiprime. - Zak Seidov, Jul 01 2005
A156659(a(n)) = 1; A156875 gives numbers of safe primes <= n. - Reinhard Zumkeller, Feb 18 2009
From Daniel Forgues, Jul 31 2009: (Start)
A safe prime p is 7 or of the form 6k-1, k >= 1, i.e., p == 5 (mod 6).
A prime p of the form 6k+1, k >= 2, i.e., p = 1 (mod 6), cannot be a safe prime since (p-1)/2 is composite and divisible by 3. (End)
If k is the product of the n-th safe prime p and its corresponding Sophie Germain prime (p-1)/2, then a(n) = 2(k-phi(k))/3 + 1, where phi is Euler's totient function. - Wesley Ivan Hurt, Oct 03 2013
From Bob Selcoe, Apr 14 2014: (Start)
When the n-th prime is divided by all primes up to the (n-1)-th prime, safe primes (p) have remainders of 1 when divided by 2 and (p-1)/2 and no other primes. That is, p(mod j)=1 iff j={2,(p-1)/2}; p>j, {p,j}=>prime. Explanation: Generally, x(mod y)=1 iff x=y'+1, where y' is the set of divisors of y, y'>1. Since safe primes (p) are of the form p(mod j)=1 iff p and j are prime, then j={j'}. That is, since j is prime, there are no divisors of j (greater than 1) other than j. Therefore, no primes other than j exist which satisfy the equation p(mod j)=1.
Except primes of the form 2^n+1 (n>=0), all non-safe primes (p') will have at least one prime (p") greater than 2 and less than (p-1)/2 such that p'(mod p")=1. Explanation: Non-safe primes (p') are of the form p'(mod k)=1 where k is composite. This means prime divisors of k exist, and p" is the set of prime divisors of k (example p'=89: k=44; p"={2,11}). The exception applies because p"={2} iff p'=2^n+1.
Refer to the rows in triangle A207409 for illustration and further explanation. (End)
Conjecture: there is a strengthening of the Bertrand postulate for n >= 24: the interval (n, 2*n) contains a safe prime. It has been tested by Peter J. C. Moses up to n = 10^7. - Vladimir Shevelev, Jul 06 2015
The six known safe primes p such that (p-1)/2 is a Fibonacci prime are in A263880. - Jonathan Sondow, Nov 04 2015
The only term in common with A005383 is 5. - Zak Seidov, Dec 31 2015
From the fourth entry onward, do these correspond to Smarandache's problem 34 (see A007931 link), specifically values which cannot be used (do not meet conditions) to confirm the conjecture? - Bill McEachen, Sep 29 2016
Primes p with the property that there is a prime q such that p+q^2 is a square. - Zak Seidov, Feb 16 2017
It is conjectured that there are infinitely many safe primes, and their estimated asymptotic density ~ 2C/(log n)^2 (where C = 0.66... is the twin prime constant A005597) converges to the actual value as far as we know. - M. F. Hasler, Jun 14 2021

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.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Except for the initial term, this is identical to A079148.
Subsequence of A088707.
Primes in A072055.

Programs

  • Haskell
    a005385 n = a005385_list !! (n-1)
    a005385_list = filter ((== 1) . a010051 . (`div` 2)) a000040_list
    -- Reinhard Zumkeller, Sep 18 2011
    
  • Magma
    [p: p in PrimesUpTo(3000) | IsPrime((p-1) div 2)]; // Vincenzo Librandi, Jul 06 2015
    
  • Maple
    with(numtheory); [ seq(safeprime(i),i=1..3000) ]: convert(%,set); convert(%,list); sort(%);
    A005385_list := n->select(i->isprime(iquo(i,2)),select(i->isprime(i),[$1..n])): # Peter Luschny, Nov 08 2010
  • Mathematica
    Select[Prime[Range[1000]],PrimeQ[(#-1)/2]&] (* Zak Seidov, Jan 26 2011 *)
  • PARI
    g(n) = forprime(x=2,n,y=x+x+1;if(isprime(y),print1(y","))) \\ Cino Hilliard, Sep 12 2004
    
  • PARI
    [x|x<-primes(10^3), bigomega(x-1)==2] \\ Altug Alkan, Nov 04 2015
    
  • Python
    from sympy import isprime, primerange
    def aupto(limit):
      alst = []
      for p in primerange(1, limit+1):
        if isprime((p-1)//2): alst.append(p)
      return alst
    print(aupto(2963)) # Michael S. Branicky, May 07 2021

Formula

a(n) = 2 * A005384(n) + 1.

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Feb 15 2001

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

A049481 Primes p such that p + 30 is also prime.

Original entry on oeis.org

7, 11, 13, 17, 23, 29, 31, 37, 41, 43, 53, 59, 67, 71, 73, 79, 83, 97, 101, 107, 109, 127, 137, 149, 151, 163, 167, 181, 193, 197, 199, 211, 227, 233, 239, 241, 251, 263, 277, 281, 283, 307, 317, 337, 349, 353, 359, 367, 379, 389, 401, 409, 419, 431, 433, 449
Offset: 1

Views

Author

Keywords

Comments

30 = A002110(3) is the 3rd primorial number.
p and p+30 are not necessarily consecutive primes. Initial segment of A045320 is identical, but 113 is not in this sequence because 113 + 30 = 143 is divisible by 13.

Examples

			7 is a term since it is prime and 7 + 30 = 37 is also prime.
		

Crossrefs

Programs

Formula

Assuming Polignac's conjecture and the first Hardy-Littlewood conjecture: Limit_{n->oo} n*log(a(n))/primepi(a(n)) = (16/3)*A005597 = 3.52086... . - Alain Rocchelli, Oct 29 2024

A156874 Number of Sophie Germain primes <= n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 18 2009

Keywords

Comments

a(n) = Sum_{k=1..n} A156660(k).
a(n) = A156875(2*n+1).
Hardy-Littlewood conjecture: a(n) ~ 2*C2*n/(log(n))^2, where C2=0.6601618158... is the twin prime constant (see A005597).
The truth of the above conjecture would imply that there exists an infinity of Sophie Germain primes (which is also conjectured).
a(n) ~ 2*C2*n/(log(n))^2 is also conjectured by Hardy-Littlewood for the number of twin primes <= n.

Examples

			a(120) = #{2, 3, 5, 11, 23, 29, 41, 53, 83, 89, 113} = 11.
		

Crossrefs

Cf. A005384 Sophie Germain primes p: 2p+1 is also prime.
Cf. A092816.

Programs

  • Mathematica
    Accumulate[Table[Boole[PrimeQ[n]&&PrimeQ[2n+1]],{n,1,200}]] (* Enrique Pérez Herrero, Apr 26 2012 *)
    Accumulate[Table[If[AllTrue[{n,2n+1},PrimeQ],1,0],{n,200}]]

Formula

a(10^n)= A092816(n). - Enrique Pérez Herrero, Apr 26 2012

Extensions

Edited and commented by Daniel Forgues, Jul 31 2009
Showing 1-10 of 43 results. Next