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.

User: Alain Rocchelli

Alain Rocchelli's wiki page.

Alain Rocchelli has authored 30 sequences. Here are the ten most recent ones:

A385093 Primes preceded and followed by gaps whose quotient (value greater or equal to 1) is greater than 2 and less than 3.

Original entry on oeis.org

331, 953, 1381, 1861, 2161, 2357, 2371, 2423, 2879, 3229, 3271, 3407, 3491, 3607, 3643, 3691, 3889, 4057, 4073, 4139, 4201, 4507, 4567, 4751, 4831, 4903, 4987, 5059, 5153, 5297, 5309, 5683, 5897, 6029, 6053, 6067, 6173, 6229, 6529, 6599, 6653, 6857, 7079, 7151, 7159, 7193, 7283, 7417, 7717, 7867, 7963
Offset: 1

Author

Alain Rocchelli, Jun 17 2025

Keywords

Comments

Primes prime(k) such that 2 < Max(prime(k)-prime(k-1), prime(k+1)-prime(k)) / Min(prime(k)-prime(k-1), prime(k+1)-prime(k)) < 3.

Examples

			331 is a term because Max(331-317,337-331)/Min(331-317,337-331) = 14/6 = 2.3333.
953 is a term because Max(953-947,967-953)/Min(953-947,967-953) = 14/6 = 2.3333.
1381 is a term because Max(1381-1373,1399-1381)/Min(1381-1373,1399-1381) = 18/8 = 2.25.
		

Crossrefs

Programs

  • Mathematica
    Prime/@Select[Range[3,1000],2James C. McMahon, Jun 29 2025 *)
  • PARI
    forprime(P=3, 8000, my(M=P-precprime(P-1), Q=nextprime(P+1)-P, AR=max(M,Q)/min(M,Q)); if(AR>2 && AR<3, print1(P,", ")));

Formula

Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 1/6.

A384618 Primes preceded and followed by gaps whose quotient (value greater or equal to 1) is greater than 2.

Original entry on oeis.org

29, 31, 59, 61, 73, 113, 127, 137, 139, 149, 151, 179, 181, 191, 199, 223, 239, 241, 269, 271, 283, 307, 317, 331, 347, 419, 421, 431, 433, 467, 521, 523, 541, 569, 571, 599, 601, 619, 641, 659, 661, 673, 773, 809, 811, 821, 829, 853, 863, 877, 887, 907, 953, 967
Offset: 1

Author

Alain Rocchelli, Jun 04 2025

Keywords

Comments

Primes prime(k) such that Max(prime(k)-prime(k-1),prime(k+1)-prime(k)) / Min(prime(k)-prime(k-1),prime(k+1)-prime(k)) > 2.

Examples

			19 is not a term because Max(19-17,23-19)/Min(19-17,23-19) = 4/2 = 2.
29 is a term because Max(29-23,31-29)/Min(29-23,31-29) = 6/2 = 3.
31 is a term because Max(31-29,37-31)/Min(31-29,37-31) = 6/2 = 3.
37 is not a term because Max(37-31,41-37)/Min(37-31,41-37) = 6/4 = 1.5.
		

Crossrefs

Cf. A384603.

Programs

  • PARI
    forprime(P=3, 1000, my(M=P-precprime(P-1), Q=nextprime(P+1)-P, AR=max(M, Q)/min(M, Q), AR0=2); if(AR>AR0, print1(P, ", ")));
    
  • Python
    from itertools import islice
    from sympy import nextprime
    def A384618_gen(): # generator of terms
        p,q,r = 2,3,5
        while True:
            s, t = q-p, r-q
            if s>(t<<1) or t>(s<<1): yield q
            p, q, r = q, r, nextprime(r)
    A384618_list = list(islice(A384618_gen(),54)) # Chai Wah Wu, Jun 10 2025

Formula

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

A384603 Primes preceded and followed by gaps whose quotient (value greater or equal to 1) is less than 2.

Original entry on oeis.org

5, 23, 37, 47, 53, 67, 79, 83, 89, 131, 157, 163, 167, 173, 211, 233, 251, 257, 263, 277, 293, 337, 353, 359, 367, 373, 379, 383, 389, 409, 439, 443, 449, 479, 503, 547, 557, 563, 577, 587, 593, 607, 613, 631, 647, 653, 677, 683, 691, 701, 709, 719, 727, 733, 739, 751, 757, 787, 797
Offset: 1

Author

Alain Rocchelli, Jun 04 2025

Keywords

Comments

Primes prime(k) such that Max(prime(k)-prime(k-1),prime(k+1)-prime(k)) / Min(prime(k)-prime(k-1),prime(k+1)-prime(k)) < 2.

Examples

			5 is a term because Max(5-3,7-5)/Min(5-3,7-5) = 2/2 = 1.
23 is a term because Max(23-19,29-23)/Min(23-19,29-23) = 6/4 = 1.5.
37 is a term because Max(37-31,41-37)/Min(37-31,41-37) = 6/4 = 1.5.
		

Crossrefs

Cf. A383215.

Programs

  • PARI
    forprime(P=3, 1000, my(M=P-precprime(P-1), Q=nextprime(P+1)-P, AR=max(M,Q)/min(M,Q), AR0=2); if(AR
    				
  • Python
    from itertools import islice
    from sympy import nextprime
    def A384603_gen(): # generator of terms
        p,q,r = 2,3,5
        while True:
            s, t = q-p, r-q
            if s<(t<<1) and t<(s<<1): yield q
            p, q, r = q, r, nextprime(r)
    A384603_list = list(islice(A384603_gen(),59)) # Chai Wah Wu, Jun 10 2025

Formula

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

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

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

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...

A381044 Primes prime(k) followed by a gap, prime(k+1)-prime(k), smaller than the local geometric average gap between consecutive primes: log(prime(k))/e^(gamma).

Original entry on oeis.org

41, 59, 71, 101, 107, 137, 149, 179, 191, 197, 227, 239, 269, 281, 311, 347, 419, 431, 461, 521, 569, 599, 617, 641, 659, 809, 821, 827, 857, 881, 1019, 1031, 1049, 1061, 1091, 1151, 1229, 1277, 1279, 1289, 1297, 1301, 1303, 1319, 1423, 1427, 1429, 1447, 1451, 1481, 1483, 1487, 1489
Offset: 1

Author

Alain Rocchelli, Apr 14 2025

Keywords

Comments

Primes prime(k) such that log(prime(k+1)-prime(k)) < log(log(prime(k)))-gamma, where log is the natural logarithm and gamma is Euler’s constant (A001620).
Except for terms less than 41, A001359 (Lesser of twin primes) is a subsequence. From 41, the first term not included is 1279.
It has been conjectured that primes are distributed around their average spacing in a Poisson distribution (cf. D. A. Goldston and A. H. Ledoan). This is the basis of the conjecture that, for k tending to infinity, the asymptotic limit of the average of log(prime(k+1)-prime(k)) is log(log(prime(k))) - gamma (where gamma is Euler's constant). Also, the geometric mean of the gap between consecutive primes [p(k+1)-p(k)] is equivalent to log(prime(k)) / e^gamma.

Examples

			29 is not a term because log(31-29) > log(log(29))-0.5772156649, i.e.: 0.693147 > 0.636894.
41 is a term because log(43-41) < log(log(41))-0.5772156649, i.e.: 0.693147 < 0.734779.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[237]],Log[NextPrime[#]-#]James C. McMahon, May 02 2025 *)
  • PARI
    forprime(P=3, 1500, my(Q=nextprime(P+1), LNDP=log(Q-P)); if(LNDP
    				

Formula

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

A383215 Primes p preceded and followed by gaps whose difference (absolute value) is greater than log(p).

Original entry on oeis.org

7, 29, 31, 113, 127, 139, 149, 181, 191, 199, 223, 241, 283, 307, 317, 331, 347, 419, 421, 431, 467, 521, 523, 541, 619, 641, 661, 673, 773, 809, 811, 821, 829, 853, 863, 877, 887, 907, 953, 967, 1009, 1021, 1031, 1049, 1051, 1061, 1069, 1087, 1129, 1151, 1153, 1213, 1259, 1277
Offset: 1

Author

Alain Rocchelli, Apr 19 2025

Keywords

Comments

Primes prime(k) such that abs(prime(k-1)-2*prime(k)+prime(k+1)) > log(prime(k)), where log is the natural logarithm.
a(n) ~ prime(round(n*e)) as n tends to infinity, where e is Euler's number.

Examples

			7 is a term because abs(5-2*7+11)=2 and log(7)=1.9459.
29 is a term because abs(23-2*29+31)=4 and log(29)=3.3673.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2,206]],Abs[NextPrime[#,-1]-2#+NextPrime[#]]>Log[#]&] (* James C. McMahon, Apr 29 2025 *)
  • PARI
    forprime(P=3, 1300, my(M=P-precprime(P-1), Q=nextprime(P+1)-P, AR1=min(M,Q), AR2=max(M,Q), AR0=log(P)); if(AR2-AR1>AR0, print1(P,", ")));

Formula

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

A383216 Primes p which are preceded and followed by gaps whose difference is greater than 2*log(p).

Original entry on oeis.org

113, 127, 523, 887, 907, 1087, 1129, 1151, 1277, 1327, 1361, 1669, 1693, 1931, 1951, 1973, 2203, 2311, 2333, 2477, 2557, 2971, 2999, 3163, 3251, 3299, 3469, 4049, 4297, 4327, 4523, 4547, 4783, 4861, 5119, 5147, 5237, 5351, 5381, 5531, 5557, 5591, 5749, 5779, 5981
Offset: 1

Author

Alain Rocchelli, Apr 19 2025

Keywords

Comments

Primes prime(k) such that abs(prime(k-1)-2*prime(k)+prime(k+1)) > 2*log(prime(k)), where log is the natural logarithm.

Examples

			113 is a term because abs(109-2*113+127)=12 and 2*log(113)=9.4548.
127 is a term because abs(113-2*127+131)=10 and 2*log(127)=9.6884.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2,782]],Abs[NextPrime[#,-1]-2#+NextPrime[#]]>2Log[#]&] (* James C. McMahon, Apr 27 2025 *)
  • PARI
    forprime(P=3, 6000, my(M=P-precprime(P-1), Q=nextprime(P+1)-P, AR1=min(M,Q), AR2=max(M,Q), AR0=2*log(P)); if(AR2-AR1>AR0, print1(P,", ")));

Formula

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

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

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

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

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.