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.

A060769 "Overdue" primes: upper ends of prime gaps that are larger than the prime number theorem predicts.

Original entry on oeis.org

29, 37, 53, 59, 67, 79, 89, 97, 127, 149, 191, 211, 223, 251, 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
Offset: 1

Views

Author

Ulrich Schimke (ulrschimke(AT)aol.com)

Keywords

Examples

			79 is in the sequence because 79/log(79) - 73/log(73) = 1.065... > 1.
		

Crossrefs

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

Programs

  • PARI
    { default(realprecision, 100); n=0; s=2/log(2); forprime (p=3, 26203, if ((r=p/log(p)) - s > 1, write("b060769.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.

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 *)

A382052 Primes prime(k) such that k*log(k)/prime(k) > (k-1)*log(k-1)/prime(k-1).

Original entry on oeis.org

3, 5, 7, 13, 19, 31, 41, 43, 47, 61, 71, 73, 83, 101, 103, 107, 109, 113, 131, 139, 151, 167, 181, 193, 197, 199, 227, 229, 233, 241, 271, 281, 283, 311, 313, 317, 337, 349, 353, 359, 373, 379, 383, 389, 401, 421, 433, 439, 443, 449, 461, 463, 467, 491, 503, 509, 523, 547, 563, 569, 571, 577, 593, 599
Offset: 1

Views

Author

Alain Rocchelli, Mar 13 2025

Keywords

Comments

All terms of this sequence are contained in A060770.
a(n) ~ prime(round(n*e/(e-1))) as n tends to infinity, cf. A185393.

Examples

			3 is a term because 2*log(2)/3 > 1*log(1)/2 and 3 is the 2nd prime following 2.
5 is a term because 3*log(3)/5 > 2*log(2)/3 and 5 is the 3rd prime following 3.
		

Crossrefs

Programs

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

Formula

Limit_{n->oo} n / PrimePi(a(n)) = 1-1/e (A068996).

A385504 Binomially timely primes: primes prime(k) that do not arrive late in comparison with the binomially weighted average of prime(1) .. prime(2k-1).

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 23, 31, 43, 47, 53, 61, 73, 79, 83, 89, 103, 107, 109, 113, 139, 151, 167, 181, 193, 197, 199, 211, 233, 239, 241, 271, 277, 281, 283, 293, 313, 317, 353, 359, 383, 389, 401, 443, 449, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 617
Offset: 1

Views

Author

Peter Munn, Jul 11 2025

Keywords

Comments

Primes prime(k) such that prime(k) <= A007443(2k-1)/2^(2k-2), where prime(k) is the k-th prime and A007443 is the binomial transform of primes.
Though the average uses all primes from 2 to prime(2k-1), their influence is substantially weighted towards the primes nearer to prime(k).
Some previously studied sets of primes that depend on each prime's relationship with a broad neighborhood of primes, e.g., convex hull primes (A319126) and A124661, can be shown to be subsets of these timely primes, and some other such sets, e.g., popular primes (A385503), look likely to be shown to be subsets too.
Comments about density within the primes: (Start)
The progressive decrease in density of the primes means this weighted average we are using might be seen as slightly biased so that primes that are "only approximately on time" qualify for the sequence. Nevertheless, this bias in the average seems to be significantly less than 0.5, slowly decreasing with index, and the author expects an analytically derivable asymptote (for the bias) of about 0.25. See also the comments in A302334.
The early race behavior (timely primes v. their complement within the primes) looks like races where the chosen subset's relative asymptotic density is 0.5 and where this subset is ahead except for occasional relatively short excursions where the complement takes over. Here, timely primes are ahead for more than 80% of the indices up to the 500th prime; they then lead continuously up to the 10000th prime, where their lead has fallen below 50 after a peak greater than 200. See the graph in the links. (End)

Examples

			The binomially weighted averages can be computed by taking progressive averages as shown in the table below:
   n   prime |<- progressive averages ... ->
  -------------------------------------------
   1:   _2_                              the _underlined_ values are the averaged primes
              5/2
   2:    3         _13/4_                   <-- 13/4 is thus the 2nd averaged prime
               4            33/8
   3:    5           5            _83/16_       <-- 83/16 is thus the 3rd averaged prime
               6            25/4  ...
   4:    7          15/2   ...              <-- 15/2 is the average of 6 and 9
               9  ...
   5:   11  ...
  ...
3 is less than 13/4, so 3 is in the sequence.
5 is less than 83/16, so 5 is in the sequence.
If we continue the average table above, we find the 5th averaged prime is 10 + 147/256, and the 5th prime, 11, is greater than this, so 11 is not in the sequence.
		

Crossrefs

See the comments for the relationship with A007443.
See the formula section for the relationship with A302334.
A124661, A319126 are subsets.

Programs

  • PARI
    \\ See Links

Formula

{a(n) : n >= 1} = {prime(k) : k >= 1 and prime(k) <= A302334(k)}.
Showing 1-4 of 4 results.