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

A111943 Prime p with prime gap q - p of n-th record Cramer-Shanks-Granville ratio, where q is smallest prime larger than p and C-S-G ratio is (q-p)/(log p)^2.

Original entry on oeis.org

23, 113, 1327, 31397, 370261, 2010733, 20831323, 25056082087, 2614941710599, 19581334192423, 218209405436543, 1693182318746371
Offset: 1

Views

Author

N. J. A. Sloane, following emails from R. K. Guy and Ed Pegg Jr, Nov 27 2005

Keywords

Comments

Primes less than 23 are anomalous and are excluded.
a(12) was discovered by Bertil Nyman in 1999.
Shanks conjectures that the ratio will never reach 1. Granville conjectures the opposite: that the ratio will exceed or come arbitrarily close to 2/e^gamma = 1.1229....
Firoozbakht's conjecture implies that the ratio is below 1-1/log(p) for all primes p>=11; see Th.1 of arXiv:1506.03042. In Cramér's probabilistic model of primes, the ratio is below 1-1/log(p) for almost all maximal gaps between primes; see A235402. - Alexei Kourbatov, Jan 28 2016

Examples

			-----------------------------
n   ratio                a(n)
-----------------------------
1   0.6103                23
2   0.6264               113
3   0.6575              1327
4   0.6715             31397
5   0.6812            370261
6   0.7025           2010733
7   0.7394          20831323
8   0.7953       25056082087
9   0.7975     2614941710599
10  0.8177    19581334192423
11  0.8311   218209405436543
12  0.9206  1693182318746371
		

References

  • R. K. Guy, Unsolved Problems in Theory of Numbers, Springer-Verlag, Third Edition, 2004, A8.

Crossrefs

Subsequence of A002386.

Programs

  • PARI
    r=CSG=0;p=13;forprime(q=17,1e8,if(q-p>r,r=q-p; t=r/log(p)^2; if(t>CSG, CSG=t; print1(p", ")));p=q) \\ Charles R Greathouse IV, Apr 07 2013

Extensions

Corrected and edited (p_n could be misinterpreted as the n-th prime) by Daniel Forgues, Nov 20 2009
Edited by Charles R Greathouse IV, May 14 2010

A166332 Number of primes in (n^(3/2)*(log(n))^(1/2)..(n+1)^(3/2)*(log(n+1))^(1/2)] semi-open intervals, n >= 1.

Original entry on oeis.org

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

Views

Author

Daniel Forgues, Oct 12 2009

Keywords

Comments

Number of primes in (n*(n*log(n))^(1/2)..(n+1)*((n+1)*log(n+1))^(1/2)] semi-open intervals, n >= 1.
The semi-open intervals form a partition of the real line for x > 0, thus each prime appears in a unique interval.
a(n) = pi((n+1)^(3/2)*(log(n+1))^(1/2)) - pi(n^(3/2)*(log(n))^(1/2)) since the intervals are semi-open properly.
The n-th interval length is: ~ (1/2)*(n+1/2)^(1/2)*(3*(log(n+1/2))^(1/2)+(log(n+1/2))^(-1/2)) ~ (3/2)*n^(1/2)*(log(n))^(1/2) as n goes to infinity.
The n-th interval prime density is: ~ 2/(3*log(n+1/2)+log(log(n+1/2))) ~ 2/(3*log(n)) as n goes to infinity.
The expected number of primes for n-th interval is: ~ (n+1/2)^(1/2)*(3*(log(n+1/2))^(1/2)+(log(n+1/2))^(-1/2))/ (3*log(n+1/2)+log(log(n+1/2))) ~ n^(1/2)/(log(n))^(1/2) as n goes to infinity.
Using Excel 2003, for n in [1..1123], I obtain a(n) >= 1 (at least one prime per interval).
CAUTION: I will submit the b-file, but since Excel 2003 is limited to 15-digit precision, the rounding might assign to the wrong interval a prime which is extremely close to the limit of 2 successive intervals. The b-file NEEDS TO BE VERIFIED using interval arithmetic! (SEE NEXT)
CAUTION (ADDENDA): for n in [1..1123], the minimum ratio of... ABS(n^(3/2)*(log(n))^(1/2)-ROUND(n^(3/2)*(log(n))^(1/2)))/(n^(3/2)*(log(n))^(1/2)) that I got is 5.04999E-09 which is well above 1E-15 (15-digit limit of Excel 2003), so no interval ended too close to an integral value and every prime has then been assigned to its proper interval. My b-file should then be reliable.
If it can be proved that each interval always contains at least one prime, this would constitute shorter intervals than A143898(n) as n gets large.
The sequence A166363 gives even shorter intervals that seem to always contain at least one prime (for n > 1)!

Crossrefs

Cf. A143898, A134034, A143935 (for primes between successive n^K, for different K).
Cf. A144140 (showing that for n^K, K=3/2, some intervals fails to contain primes).
Cf. A166363 (for primes in even shorter intervals).
Cf. A014085 (for primes between successive squares).
Cf. A000720.

Extensions

Corrected and edited by Daniel Forgues, Oct 14 2009
Edited by Daniel Forgues, Oct 20 2009

A166712 Number of primes in (n*log(n)..(n+1)*log(n+1)] semi-open intervals, n >= 1.

Original entry on oeis.org

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

Views

Author

Daniel Forgues, Oct 19 2009, Oct 23 2009

Keywords

Comments

The semi-open intervals form a partition of the real line for x > 0, thus each prime appears in a unique interval.
The n-th interval length is:
log(n+1/2)+1
log(n) as n goes to infinity
The n-th interval prime density is:
1/[log(n+1/2)+log(log(n+1/2))]
1/log(n) as n goes to infinity
The expected number of primes for n-th interval is:
[log(n+1/2)+1] / [log(n+1/2)+log(log(n+1/2))]
1 as n goes to infinity (for expected number of primes per interval)
The expected number of primes per interval is asymptotic to 1.
The actual number of primes per interval is not asymptotic to 1 since it does not actually converge but just keeps on hitting cardinals on and around 1 (mostly 0, 1 and 2.)
The average of the actual number of primes per interval for all intervals from 1 to n is asymptotic to 1.
The sequence first attains k = 0, 1, 2,... at n = 1, 3, 2, 234, 3843, 71221,... - T. D. Noe, Oct 15 2012

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[(n+1)*Log[n+1]] - PrimePi[n*Log[n]], {n, 100}] (* T. D. Noe, Oct 15 2012 *)

Formula

a(n) = pi((n+1)*log(n+1)) - pi(n*log(n)) since the intervals are semi-open properly.

A345755 a(n) is the number of primes p satisfying n*(log_2(n))^2 < p <= (n+1)*(log_2(n+1))^2.

Original entry on oeis.org

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

Views

Author

Hal M. Switkay, Jun 27 2021

Keywords

Comments

Prime gaps appear to grow more slowly than any power function.
Cramér's conjecture states that prime gaps grow as follows: prime(n+1) - prime(n) = O(log(prime(n))^2).
Since prime(n) ~ n*log(n), we conjecture that a(n) > 0 for n > 0, and that the exponent 2 cannot be replaced by any smaller exponent.
Note: n*(log_2(n))^2 < n^(log(127)/log(16)) when n >= 267. Therefore the conjecture immediately above is stronger than the conjecture that A143935(n) > 0 when n > 0, which in turn is stronger than Legendre's conjecture.
This sequence relies on intervals that are slightly more than twice as wide as those in the similar sequence A166363. A comment at that sequence by Greathouse discovers zero values (representing prime-free intervals). In contrast, the present sequence does not include zero entries for n <= 2772, suggesting that the lengths of prime gaps may be bracketed by the two sequences. We conjecture that prime gaps may be larger than log(p)^2, but are not larger than log_2(p)^2. - Hal M. Switkay, Aug 29 2023

Examples

			a(10) is the number of primes > 110.35 and <= 131.64. a(10) = 3, because the primes in this interval are 113, 127, and 131.
		

Crossrefs

Programs

  • Mathematica
    Differences @ Table[PrimePi[n*Log2[n]^2], {n, 1, 100}] (* Amiram Eldar, Jun 27 2021 *)
  • PARI
    f(n) = n*(log(n)/log(2))^2;
    a(n) = primepi(f(n+1)) - primepi(f(n)); \\ Michel Marcus, Jun 30 2021

A166737 Number of primes in (n^2*log(n)..(n+1)^2*log(n+1)] semi-open intervals, n >= 1.

Original entry on oeis.org

1, 3, 4, 4, 6, 6, 8, 8, 10, 11, 10, 13, 13, 14, 16, 14, 17, 20, 18, 21, 21, 22, 21, 24, 22, 30, 22, 31, 28, 25, 34, 32, 32, 33, 33, 34, 36, 38, 41, 35, 41, 40, 41, 45, 41, 41, 48, 49, 48, 49, 48, 48, 48, 54, 56, 54, 51, 56, 56, 61, 62, 57, 60, 62, 63, 59, 65, 66, 64, 65, 77, 67
Offset: 1

Views

Author

Daniel Forgues, Oct 21 2009

Keywords

Comments

Number of primes in (n*(n*log(n))..(n+1)*((n+1)*log(n+1))] semi-open intervals, n >= 1.
The semi-open intervals form a partition of the real line for x > 0, thus each prime appears in a unique interval.
The n-th interval length is:
(n+1/2)*[2*log(n+1/2)+1]
2*n*log(n) as n goes to infinity
The n-th interval prime density is:
1/[2*log(n+1/2)+log(log(n+1/2))]
1/(2*log(n)) as n goes to infinity
The expected number of primes for n-th interval is:
(n+1/2)*[2*log(n+1/2)+1]/[2*log(n+1/2)+log(log(n+1/2))]
n as n goes to infinity
The actual number of primes for n-th interval seems to be (from graph): a(n) = n + O(n^(1/2))
The partial sums of this sequence give:
pi((n+1)^2*log(n+1)) = Sum_{i=1}^n {a(i)} ~ Sum_{i=1}^n {i} = t_n = n*(n+1)/2

Crossrefs

Cf. A166712 (for intervals containing an asymptotic average of one prime.)
Cf. A014085 (for primes between successive squares.)
Cf. A000720.

Formula

a(n) = pi((n+1)^2*log(n+1)) - pi(n^2*log(n)) since the intervals are semi-open properly.

Extensions

Corrected and edited by Daniel Forgues, Oct 23 2009
Showing 1-5 of 5 results.