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.

A288907 Primes p whose distance from the next prime and from the previous prime is less than log(p).

Original entry on oeis.org

71, 101, 103, 107, 109, 193, 197, 227, 229, 281, 311, 313, 349, 433, 439, 443, 461, 463, 503, 563, 569, 571, 593, 599, 601, 607, 613, 617, 643, 647, 653, 659, 677, 733, 739, 757, 823, 827, 857, 859, 881, 883, 941, 947, 971, 977, 1013, 1019, 1033, 1063, 1091, 1093
Offset: 1

Views

Author

Giuseppe Coppoletta, Jun 19 2017

Keywords

Comments

Primes preceded and followed by less-than-average prime gaps (by the Prime Number Theorem, see link).
This sequence is a subsequence of A381850 and of A383652. - Alain Rocchelli, May 07 2025

Examples

			n = 23 is not a term because 23 - 19 > log(23) = 3.13...
n = 71 is a term because log(71) = 4.71.. and 73 - log(71) < 71 < 67 + log(71).
		

Crossrefs

Programs

  • Maple
    q:= p-> isprime(p) and is(max(nextprime(p)-p, p-prevprime(p))Alois P. Heinz, May 12 2025
  • Mathematica
    Select[Range[2, 220] // Prime, Max[ Abs[# - NextPrime[#, {-1, 1}]]] < Log[#] &] (* Giovanni Resta, Jun 19 2017 *)
  • PARI
    is(n) = ispseudoprime(n) && n-precprime(n-1) < log(n) && nextprime(n+1)-n < log(n) \\ Felix Fröhlich, Jun 19 2017
  • Sage
    [n for n in prime_range(3,1300) if next_prime(n)-n
    				

Formula

A151800(a(n)) - log(a(n)) < a(n) < A151799(a(n)) + log(a(n)).
Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = (1-1/e)^2 (A068996). - Alain Rocchelli, May 07 2025

A330426 Primes P where the distance to the nearest prime is greater than 2*log(P).

Original entry on oeis.org

211, 2179, 2503, 3967, 4177, 7369, 7393, 11027, 11657, 14107, 16033, 16787, 18013, 18617, 18637, 18839, 19661, 21247, 23719, 24281, 29101, 32749, 33247, 33679, 33997, 37747, 38501, 40063, 40387, 42533, 42611, 44417, 46957, 51109, 51383, 53479, 54217, 55291, 55763
Offset: 1

Views

Author

Steven M. Altschuld, Dec 14 2019

Keywords

Comments

The author suggests that these numbers be called Double Frogger Primes because two times the distance as the average distance to the nearest neighbor (the log) has to be hopped.

Examples

			P = 211 is a term because 199 + 2*log(211) < 211 < 223 - 2*log(211).
P = 199 is not a term because 197 + 2*log(199) > 199.
		

Crossrefs

Cf. A288908 (with 1*log(P)), A330427 (with 3*log(P)), A330428.

Programs

  • Magma
    f:=func;  [p:p in PrimesUpTo(56000)|f(p)];// Marius A. Burtea, Dec 18 2019
  • Maple
    q:= 3: state:= false: count:= 0: Res:= NULL:
    while count < 100 do
      p:= nextprime(q);
      newstate:= is(p-q > 2*log(q));
      if state and newstate then
        count:= count+1; Res:= Res, q;
      fi;
      q:= p; state:= newstate;
    od:
    Res; # Robert Israel, Dec 18 2019
  • Mathematica
    lst={};Do[a=Prime[n];If[Min[Abs[a-NextPrime[a,{-1,1}]]]>2*Log[a],AppendTo[lst,a]],{n,1,10000}];lst (* Metin Sariyar, Dec 15 2019 *)
    (* Second program: *)
    Select[Prime@ Range[10^4], Min@ Abs[# - NextPrime[#, {-1, 1}]] > 2 Log[#] &] (* Michael De Vlieger, Dec 15 2019 *)

Extensions

More terms from Metin Sariyar, Dec 15 2019

A330427 Primes P where the nearest prime is greater than 3*log(P) away.

Original entry on oeis.org

38501, 58831, 153191, 203713, 206699, 232259, 247141, 250543, 268343, 279269, 286927, 302053, 330509, 362521, 362801, 404597, 413353, 421559, 430193, 438091, 479081, 479701, 485263, 504727, 512207, 515041, 539573, 539993, 546781, 569369, 574859, 590489, 624917
Offset: 1

Views

Author

Steven M. Altschuld, Dec 14 2019

Keywords

Comments

The author suggests that these numbers be called Triple Frogger Primes because three times the distance as the average distance to the nearest neighbor (the log) has to be hopped.

Crossrefs

Cf. A288908 (with 1*log(P)), A330426 (with 2*log(P)), A330428 (Lowest Frogger Primes).

Programs

  • Magma
    f:=func;  [p:p in PrimesUpTo(630000)|f(p)];// Marius A. Burtea, Dec 18 2019
    
  • Maple
    q:= 3: state:= false: count:= 0: Res:= NULL:
    while count < 100 do
      p:= nextprime(q);
      newstate:= is(p-q > 3*log(q));
      if state and newstate then
        count:= count+1; Res:= Res, q;
      fi;
      q:= p; state:= newstate;
    od:
    Res; # Robert Israel, Dec 18 2019
  • Mathematica
    Select[Prime@ Range[10^5], Min@ Abs[# - NextPrime[#, {-1, 1}]] > 3 Log[#] &] (* Michael De Vlieger, Dec 15 2019 *)
  • PARI
    lista(nn) = {my(x=2, y=3); forprime(p=5, nn, if(min(p-y, y-x)>3*log(y), print1(y, ", ")); x=y; y=p); } \\ Jinyuan Wang, Mar 03 2020

Extensions

More terms from Michael De Vlieger, Dec 15 2019

A330428 Smallest prime p such that both nearest primes up and down are farther away than n*log(p).

Original entry on oeis.org

5, 211, 38501, 413353, 10938023, 142414669, 163710121, 8835528511, 31587561361, 343834606051, 1480975873513, 26923643849953
Offset: 1

Views

Author

Steven M. Altschuld, Dec 14 2019

Keywords

Comments

For these numbers, the name "Lowest Frogger Primes" LFP(n) is suggested because (frog) jumps with a length greater than n times the local average are required to bridge the gaps (logs).

Crossrefs

Cf. A288908 (with 1*log(P)), A330426 (with 2*log(P)), A330427 (with 3*log(P)).

Programs

  • PARI
    {my(npp=2,np=3,n=1);forprime(p=5,10^9,my(d=log(p)*n);if(np-npp>d&&p-np>d,print(np,", ");n++);npp=np;np=p)} \\ Hugo Pfoertner, Dec 14 2019

Extensions

a(5)-a(9) from Hugo Pfoertner, Dec 14 2019
a(10) from Hugo Pfoertner, Dec 16 2019
a(11)-a(12) from Giovanni Resta, Dec 19 2019
Showing 1-4 of 4 results.