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

A060770 "Early" primes: upper ends of prime gaps that are smaller than the prime number theorem predicts.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 31, 41, 43, 47, 61, 71, 73, 83, 101, 103, 107, 109, 113, 131, 137, 139, 151, 157, 163, 167, 173, 179, 181, 193, 197, 199, 227, 229, 233, 239, 241, 257, 263, 269, 271, 277, 281, 283, 311
Offset: 1

Views

Author

Ulrich Schimke (ulrschimke(AT)aol.com)

Keywords

Examples

			11 is in the sequence because 11/log(11) - 7/log(7) = 0.990... < 1.
		

Crossrefs

Apart from 2 this is the complementary prime set to A060769.

Programs

  • PARI
    { default(realprecision, 100); n=0; s=2/log(2); forprime (p=3, 12583, if ((r=p/log(p)) - s < 1, write("b060770.txt", n++, " ", p); ); s=r; ) } \\ Harry J. Smith, Jul 11 2009

Formula

A prime p belongs to the sequence iff p/log(p) - q/log(q) < 1 where q is the preceding prime.

A060771 Upper ends of record prime gaps under consideration of the prime number theorem.

Original entry on oeis.org

3, 5, 7, 11, 29, 97, 127, 541, 907, 1151, 1361, 15727, 19661, 31469, 156007, 360749, 370373, 1357333, 2010881, 17051887, 20831533, 47326913, 191913031, 436273291, 2300942869, 3842611109, 4302407713, 10726905041, 22367085353, 25056082543
Offset: 1

Views

Author

Ulrich Schimke (ulrschimke(AT)aol.com)

Keywords

Comments

Every element > 7 must be in A000101 too (consider the derivatives of x/log(x) to prove this), but not conversely. The sequence is infinite since lim sup (length of n-th prime gap/log(n-th prime)) is infinite, proved by Westzynthius, see Ribenboim.

Examples

			541 is okay since 541/log(541) - 523/log(523) = 2.4108.. was not reached by smaller primes
		

References

  • P. Ribenboim, The Book of Prime Number Records, Chapter about prime gaps.
  • E. Westzynthius, Über die Verteilung der Zahlen, die zu den n ersten Primzahlen teilerfremd sind Comm. Phys. Math. Helsingfors 25, 1931.

Crossrefs

Formula

A prime p belongs to the sequence iff p/log(p) - q/log(q) attains a new high, where q is the preceding prime.

A330823 a(1) = 1; for n > 1, a(n) = a(n-1) - n if n is prime, otherwise a(n) = a(n-1) + floor(n/(log(n)-1)).

Original entry on oeis.org

1, -1, -4, 6, 1, 8, 1, 8, 15, 22, 11, 19, 6, 14, 22, 31, 14, 23, 4, 14, 24, 34, 11, 22, 33, 44, 55, 67, 38, 50, 19, 31, 44, 57, 70, 83, 46, 60, 74, 88, 47, 62, 19, 34, 50, 66, 19, 35, 51, 68, 85, 102, 49, 67, 85, 103, 121, 139, 80, 99, 38, 57, 77, 97, 117, 137, 70
Offset: 1

Views

Author

Scott R. Shannon, Jan 02 2020

Keywords

Comments

The Prime Number Theorem shows that the probability of a random number not greater than x being prime is approximately 1/log(x), therefore the probability of a number being composite in the same range is approximately (log(x)-1)/log(x). As this sequence subtracts n from the previous term if n is prime, or adds n with a weighting of 1/(log(n)-1) if n is composite, its expected value as n goes to infinity is approximately n*(1/(log(n)-1))*((log(n)-1)/log(n)) - n*(1/log(n)) = 0. We therefore expect that a(n)/n approaches 0 as n goes to infinity.
In the first 2 million terms the sequence changes sign 1900 times, has a maximum positive value of 160213275 at a(1772200), and a maximum negative value of -29535301 at a(1513751). The majority of terms are positive. See the image link below.

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - 1] + If[PrimeQ[n], -n, Floor[n/(Log[n] - 1)]]; Array[a, 67] (* Amiram Eldar, Jan 05 2020 *)

A382051 Primes prime(k) such that k*log(k)/prime(k) < (k-1)*log(k-1)/prime(k-1).

Original entry on oeis.org

11, 17, 23, 29, 37, 53, 59, 67, 79, 89, 97, 127, 137, 149, 157, 163, 173, 179, 191, 211, 223, 239, 251, 257, 263, 269, 277, 293, 307, 331, 347, 367, 397, 409, 419, 431, 457, 479, 487, 499, 521, 541, 557, 587, 631, 641, 673, 691, 701, 709, 719, 727, 751, 769, 787, 797
Offset: 1

Views

Author

Alain Rocchelli, Mar 13 2025

Keywords

Comments

a(n) ~ prime(round(n*e)) as n tends to infinity, where e is Euler's number.

Examples

			11 is a term because 5*log(5)/11 < 4*log(4)/7 and 11 is the 5th prime following 7.
17 is a term because 7*log(7)/17 < 6*log(6)/13 and 17 is the 7th prime following 13.
		

Crossrefs

A subsequence is A060769.

Programs

  • Mathematica
    Select[Prime[Range[2,139]],PrimePi[#]*Log[PrimePi[#]]/#<(PrimePi[#]-1)*Log[PrimePi[#]-1]/NextPrime[#,-1]&] (* James C. McMahon, Apr 08 2025 *)
  • PARI
    my(N=1); forprime(P=3, 800, my(Q=precprime(P-1), AR0=N*log(N)/Q, AR=(N+1)*log(N+1)/P); N++; if(AR
    				

Formula

Limit_{n->oo} n / PrimePi(a(n)) = 1/e.
Showing 1-4 of 4 results.