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.

A124136 The list of primes p such that the number of primes in the open interval (p,2*p) is larger than the number of primes in the open interval (q,2*q) for all q

This page as a plain text file.
%I A124136 #17 May 22 2025 20:57:32
%S A124136 2,7,11,17,23,29,31,37,53,59,71,79,89,97,101,127,137,149,157,179,191,
%T A124136 211,223,233,251,257,263,293,307,311,331,347,367,373,379,389,409,419,
%U A124136 431,443,457,479,487,499,521,541,547,557,563,587,599,613,617,631,641
%N A124136 The list of primes p such that the number of primes in the open interval (p,2*p) is larger than the number of primes in the open interval (q,2*q) for all q<p.
%C A124136 Sequence A060715(n) lists the number of primes in the open interval (n,2*n).
%C A124136 If we extract its sublist for n a prime, the number of primes in the open interval (p,2*p), we have A070046(m) = 1, 1, 1, 2, 3, 3, 4, 4, 5, 6, 7, 9, 9, 9, 9, 11, 13, 12, 13, 14, 13, 15, 15, 16... for the primes p=2, 3, 5, 7, 11, 13, 17, 19 etc.
%C A124136 This sequence lists the primes p = prime(m) that set a new record in A070046(m).
%C A124136 Alternative definition: primes p defined by positions of records in A063124.
%e A124136 a(1)=prime(1)=2 with 1 prime in the interval (2,4). a(2) is neither 3 (with 1 prime in the interval (3,6)), nor 5 (with 1 prime in the interval (5,10)), but a(2)=7 with 2 primes in the interval (7,14).
%e A124136 The primes 41, 43 and 47 are not in the list because the intervals (41,82), (43,86) and (47,94) contain 9 primes, but the interval (37,74) with the smaller prime p=37 already contained 9 primes.
%e A124136 The prime 53 is in the list because the interval (53,106) contains 11 primes and the intervals (q,2*q) for primes q =2,3, 5, ..,47 contained 9 or less primes.
%p A124136 ts_c:=proc(n) local i,j,st_p,max_stp,ans; ans:= [ ]: st_p:=0: max_stp:=0: for i from 2 to n do for j from i+1 to 2*i-1 do if (isprime(j) = 'true') then st_p:=st_p+1: fi od: if (st_p > max_stp and isprime(i) = 'true') then max_stp := st_p: ans:=[ op(ans),i ]: fi; st_p:=0: od: RETURN(ans) end: ts_c(1200);
%Y A124136 Cf. A060756, A060715, A084139.
%K A124136 nonn
%O A124136 1,1
%A A124136 _Jani Melik_, Nov 30 2006
%E A124136 Definition recovered from the Maple program. - _R. J. Mathar_, May 21 2025