login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228098 Number of primes p > prime(n) and such that prime(n)*p < prime(n+1)^2. 5

%I #45 May 24 2021 00:16:04

%S 1,2,1,3,1,2,1,1,2,1,3,2,1,1,2,2,1,3,2,1,2,1,1,3,2,1,2,1,1,4,1,2,1,3,

%T 1,2,2,1,2,2,1,4,1,2,1,2,4,2,1,1,2,1,2,2,2,2,1,3,2,1,1,4,2,1,1,2,1,3,

%U 1,1,1,2,2,2,1,1,2,1,1,2,1,3,1,2,1,1,3

%N Number of primes p > prime(n) and such that prime(n)*p < prime(n+1)^2.

%C For n > 1, a(n)+1 is the number of composite numbers < prime(n+1)^2 and removed at the n-th step of Eratosthenes's sieve. The exception for n=1 comes from prime(1)^3 = 2^3 = 8 < prime(2)^2 = 9. This does not occur any more because prime(n)^3 > prime(n+1)^2 for all n > 1.

%C a(n) is related to the distribution of primes around prime(n+1). High values correspond to a large gap before prime(n+1) followed by several small gaps after prime(n+1).

%C a(n) >= 1 for all n, because prime(n+1) always trivially satisfies the condition. The sequence tends to alternate high and low values, and takes its minimum value 1 about half the time.

%C a(n) is >= and almost always equal to a'(n), defined as the number of primes between prime(n+1) (inclusive) and prime(n+1) + gap(n) (inclusive), with gap(n) = prime(n+1) - prime(n) = A001223(n).

%C An exception is 7, for which a(7) = 3, while the following prime is 11, thus gap(7) = 4, and there are only two primes between 11 and 11 + 4 = 15. It is probably the only one, as it is easily seen that a(n) = a'(n) if gap(n) <= sqrt(2*prime(n)), which is a condition a little stronger than Andrica's Conjecture: gap(n) < 2*sqrt(prime(n))+1. 7 is probably a record for the ratio gap(n)/sqrt(prime(n)), and the only prime for which it is > sqrt(2) (see A079296 for an ordering of primes according to Andrica's conjecture).

%H Jean-Christophe Hervé, <a href="/A228098/b228098.txt">Table of n, a(n) for n = 1..9999</a>

%H C. K. Caldwell, <a href="http://www.utm.edu/research/primes/notes/gaps.html">Gaps between primes</a>.

%H Eric W. Weisstein, <a href="http://mathworld.wolfram.com/AndricasConjecture.html">Andrica's Conjecture</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Andrica&#39;s_conjecture">Andrica's conjecture</a>

%H Marek Wolf, <a href="http://arxiv.org/abs/1010.3945">A note on the Andrica conjecture</a>, arXiv:1010.3945 [math.NT], 2010.

%e a(4)=3 because prime(4)=7, prime(5)=11, 11^2=121, and 7*11 < 7*13 < 7*17 < 121 < 7*19.

%t Table[PrimePi[Prime[n + 1]^2/Prime[n]] - n, {n, 100}] (* _T. D. Noe_, Oct 29 2013 *)

%o (Sage)

%o P = Primes()

%o def a(n):

%o p=P.unrank(n-1)

%o p1=P.unrank(n)

%o L=[q for q in [p+1..p1^2] if q in Primes() and p*q<p1^2]

%o return len(L)

%o k=100 #change k for more terms

%o [a(m) for m in [1..k]] # _Tom Edgar_, Oct 29 2013

%Y Cf. A000040, A001223, A083140, A079296.

%K nonn,easy

%O 1,2

%A _Jean-Christophe Hervé_, Oct 26 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 9 20:04 EDT 2024. Contains 375044 sequences. (Running on oeis4.)