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.

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

This page as a plain text file.
%I A330426 #43 Sep 08 2022 08:46:24
%S A330426 211,2179,2503,3967,4177,7369,7393,11027,11657,14107,16033,16787,
%T A330426 18013,18617,18637,18839,19661,21247,23719,24281,29101,32749,33247,
%U A330426 33679,33997,37747,38501,40063,40387,42533,42611,44417,46957,51109,51383,53479,54217,55291,55763
%N A330426 Primes P where the distance to the nearest prime is greater than 2*log(P).
%C A330426 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.
%H A330426 Robert Israel, <a href="/A330426/b330426.txt">Table of n, a(n) for n = 1..2000</a>
%e A330426 P = 211 is a term because 199 + 2*log(211) < 211 < 223 - 2*log(211).
%e A330426 P = 199 is not a term because 197 + 2*log(199) > 199.
%p A330426 q:= 3: state:= false: count:= 0: Res:= NULL:
%p A330426 while count < 100 do
%p A330426   p:= nextprime(q);
%p A330426   newstate:= is(p-q > 2*log(q));
%p A330426   if state and newstate then
%p A330426     count:= count+1; Res:= Res, q;
%p A330426   fi;
%p A330426   q:= p; state:= newstate;
%p A330426 od:
%p A330426 Res; # _Robert Israel_, Dec 18 2019
%t A330426 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 *)
%t A330426 (* Second program: *)
%t A330426 Select[Prime@ Range[10^4], Min@ Abs[# - NextPrime[#, {-1, 1}]] > 2 Log[#] &] (* _Michael De Vlieger_, Dec 15 2019 *)
%o A330426 (Magma) f:=func<p|Abs(p-NextPrime(p)) gt 2*Log(p) and Abs(p-PreviousPrime(p)) gt 2*Log(p)>;  [p:p in PrimesUpTo(56000)|f(p)];// _Marius A. Burtea_, Dec 18 2019
%Y A330426 Cf. A288908 (with 1*log(P)), A330427 (with 3*log(P)), A330428.
%K A330426 nonn
%O A330426 1,1
%A A330426 _Steven M. Altschuld_, Dec 14 2019
%E A330426 More terms from _Metin Sariyar_, Dec 15 2019