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

A288908 Primes p whose distance from next prime and from previous prime is greater than log(p).

Original entry on oeis.org

5, 7, 23, 37, 47, 53, 89, 157, 173, 211, 251, 257, 263, 293, 331, 337, 359, 367, 373, 389, 409, 479, 631, 691, 701, 709, 719, 787, 797, 839, 919, 929, 1163, 1171, 1201, 1249, 1259, 1381, 1399, 1409, 1471, 1511, 1523, 1531, 1637, 1709, 1733, 1801, 1811, 1823
Offset: 1

Views

Author

Giuseppe Coppoletta, Jun 19 2017

Keywords

Comments

Primes preceded and followed by larger-than-average prime gaps (see link), then included in A082885.

Examples

			n = 5 is a term because 3 + log(5) < 5 < 7 - log(5).
n = 11 is not a term because 13 - 11 < log(11) = 2.39...
		

Crossrefs

Programs

  • Magma
    f:=func;  [p:p in PrimesInInterval(3,2000)|f(p)]; // Marius A. Burtea, Dec 19 2019
  • Mathematica
    Select[Prime@ Range[2, 300], Min@ Abs[# - NextPrime[#, {-1,1}]] > Log[#] &] (* Giovanni Resta, Jun 19 2017 *)
  • Sage
    [n for n in prime_range(3,2000) if next_prime(n)-n>log(n) and n-previous_prime(n)>log(n)]
    

Formula

A151799(a(n)) + log(a(n)) < a(n) < A151800(a(n)) - log(a(n)).

A381850 Primes p preceded and followed by primes whose difference is less than 2*log(p).

Original entry on oeis.org

41, 43, 59, 61, 71, 73, 101, 103, 107, 109, 137, 151, 163, 167, 179, 193, 197, 227, 229, 233, 239, 269, 271, 277, 281, 311, 313, 349, 353, 379, 383, 419, 421, 431, 433, 439, 443, 457, 461, 463, 487, 491, 499, 503, 563, 569, 571, 593, 599, 601, 607, 613, 617, 641, 643, 647, 653
Offset: 1

Views

Author

Alain Rocchelli, May 06 2025

Keywords

Comments

Primes prime(k) such that prime(k+1) - prime(k-1) < 2*log(prime(k)).
Since the geometric mean is never greater than the arithmetic mean: this sequence is a subsequence of A383652.

Examples

			19 is not a term because 23-17=6 and 2*log(19)=5.8889.
41 is a term because 43-37=6 and 2*log(41)=7.4271.
131 is not a term because 137-127=10 and 2*log(131)=9.7504.
137 is a term because 139-131=8 and 2*log(137)=9.8400.
		

Crossrefs

A288907 is a subsequence.

Programs

  • Maple
    P:= select(isprime,[2,seq(i,i=3..1000,2)]):
    P[select(i -> is(P[i+1]-P[i-1] < 2*log(P[i])), [$2..nops(P)-1])]; # Robert Israel, Jun 06 2025
  • Mathematica
    Select[Prime[Range[120]],NextPrime[#] - NextPrime[#,-1] < 2Log[#] &] (* Stefano Spezia, May 06 2025 *)
  • PARI
    forprime(P=3, 800, my(M=precprime(P-1), Q=nextprime(P+1)); if(Q-M<2*log(P), print1(P,", ")));

Formula

Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 1-(3/e^2).

A383652 Primes p preceded and followed by gaps whose product is less than (log(p))^2.

Original entry on oeis.org

17, 19, 41, 43, 59, 61, 71, 73, 101, 103, 107, 109, 137, 139, 149, 151, 163, 167, 179, 181, 191, 193, 197, 199, 227, 229, 233, 239, 241, 269, 271, 277, 281, 283, 311, 313, 347, 349, 353, 379, 383, 397, 401, 419, 421, 431, 433, 439, 443, 457, 461, 463, 487, 491, 499, 503, 521, 523, 563, 569, 571, 593, 599
Offset: 1

Views

Author

Alain Rocchelli, May 04 2025

Keywords

Comments

Since the geometric mean is never greater than the arithmetic mean: A381850 is a subsequence.

Examples

			17 is a term because (17-13)*(19-17)=8 is less than (log(17))^2=8.0271.
19 is a term because (19-17)*(23-19)=8 is less than (log(19))^2=8.6697.
29 is not a term because(29-23)*(31-29)=12 is greater than (log(29))^2=11.3387.
		

Crossrefs

A288907 and A381850 are subsequences.
Cf. A083550.

Programs

  • Mathematica
    Select[Range[2, 110] // Prime, (# - NextPrime[#, -1])(NextPrime[#] - #) < Log[#]^2 &] (* Stefano Spezia, May 04 2025 *)
  • PARI
    forprime(P=3, 600, my(M=P-precprime(P-1), Q=nextprime(P+1)-P, AR=M*Q, AR0=(log(P))^2); if(AR
    				

Formula

Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 0.720268...
Showing 1-3 of 3 results.