login
Primes p for which there are at least as many primes in the range [p*nextprime(p), nextprime(p)^2] as in the range [p^2, p*nextprime(p)], where nextprime(p) gives the next prime after prime p.
4

%I #12 Mar 31 2015 00:28:43

%S 2,3,5,7,11,13,17,19,23,29,31,37,43,47,53,59,61,67,71,73,79,83,89,103,

%T 107,109,113,127,131,137,139,149,151,157,173,199,211,233,239,241,251,

%U 263,269,281,293,311,317,331,337,349,353,359,379,383,397,401,409,421,431,433,439,449,461,463,467,487,491,499,509

%N Primes p for which there are at least as many primes in the range [p*nextprime(p), nextprime(p)^2] as in the range [p^2, p*nextprime(p)], where nextprime(p) gives the next prime after prime p.

%H Antti Karttunen, <a href="/A256484/b256484.txt">Table of n, a(n) for n = 1..3457</a>

%F a(n) = A000040(A256474(n)).

%e For p=3, we have in the range [3*3, 3*5] two primes, {11, 13}, and in the latter range [3*5, 5*5] we have three primes {17, 19, 23}, thus 3 is included in the sequence.

%t Select[Prime@ Range@ 100, Count[Range[# NextPrime[#], NextPrime[#]^2], _?PrimeQ] >= Count[Range[#^2, # NextPrime[#]], _?PrimeQ] &] (* _Michael De Vlieger_, Mar 30 2015 *)

%o (Scheme) (define (A256484 n) (A000040 (A256474 n)))

%Y Complement among primes: A256485.

%Y Cf. A256472 (a subsequence).

%Y Cf. A000040, A256474.

%K nonn

%O 1,1

%A _Antti Karttunen_, Mar 30 2015