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.

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

This page as a plain text file.
%I A381850 #40 Jun 06 2025 19:26:29
%S A381850 41,43,59,61,71,73,101,103,107,109,137,151,163,167,179,193,197,227,
%T A381850 229,233,239,269,271,277,281,311,313,349,353,379,383,419,421,431,433,
%U A381850 439,443,457,461,463,487,491,499,503,563,569,571,593,599,601,607,613,617,641,643,647,653
%N A381850 Primes p preceded and followed by primes whose difference is less than 2*log(p).
%C A381850 Primes prime(k) such that prime(k+1) - prime(k-1) < 2*log(prime(k)).
%C A381850 Since the geometric mean is never greater than the arithmetic mean: this sequence is a subsequence of A383652.
%H A381850 Robert Israel, <a href="/A381850/b381850.txt">Table of n, a(n) for n = 1..10000</a>
%F A381850 Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 1-(3/e^2).
%e A381850 19 is not a term because 23-17=6 and 2*log(19)=5.8889.
%e A381850 41 is a term because 43-37=6 and 2*log(41)=7.4271.
%e A381850 131 is not a term because 137-127=10 and 2*log(131)=9.7504.
%e A381850 137 is a term because 139-131=8 and 2*log(137)=9.8400.
%p A381850 P:= select(isprime,[2,seq(i,i=3..1000,2)]):
%p A381850 P[select(i -> is(P[i+1]-P[i-1] < 2*log(P[i])), [$2..nops(P)-1])]; # _Robert Israel_, Jun 06 2025
%t A381850 Select[Prime[Range[120]],NextPrime[#] - NextPrime[#,-1] < 2Log[#] &] (* _Stefano Spezia_, May 06 2025 *)
%o A381850 (PARI) forprime(P=3, 800, my(M=precprime(P-1), Q=nextprime(P+1)); if(Q-M<2*log(P), print1(P,", ")));
%Y A381850 Cf. A000040, A031131, A383652.
%Y A381850 A288907 is a subsequence.
%K A381850 nonn
%O A381850 1,1
%A A381850 _Alain Rocchelli_, May 06 2025