For how many nonnegative integers n ≤ 2 5 does there exist a set of 1 0 0 0 consecutive positive integers containing exactly n primes?
This problem is shared by Shyan A . from the Hungary-Israel Contest.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Nice job!
hmm no need for such complexity. simply put primes are extremely dense at the start (2,3,5,7,11 so 5 out of 11) and more and more distant as you go further down the number line. in mathematical terms pi(x) ~ x/log x. so when you reach for example a million, you can easily find a set of 1000 consecutive numbers containing no prime numbers or only one.. because there is no limitation on where to pick the starting line, you can easily pick a starting point that suits your needs, such that the next 1000 numbers will only contain as many primes as you wish.
Log in to reply
That's not a rigorous proof
Log in to reply
well yeah kinda, but once you mess around with primes for 2 years you come to learn their nature a bit and it just seems instinctive. but actually you can't really have a "rigorous proof" until you have some order to primes which is currently impossible. simply understanding that the density of primes is going down at an unknown rate of approximately pi(x) ~ x/log x (actually x/(log x -1) is a better approach but still) using prime number theorem, is enough to determine that if you pick all possible starting points you are bound to get some 1000 consecutive numbers which has anywhere between ~ 1000/log 1000 to 0 primes in them.
Log in to reply
@Daniel Magen – You're saying you can't really have a rigorous proof? I think this solution by Sreejato is very rigorous. What's wrong with it?
I agree that it is mostly based on intuition, but still I like the idea.
Can you please explain why π ( x ) ≈ l o g x x ? Seems to be related to calculus or growth of functions (and I am extremely poor in both of them). Anyways, thanks for the alternate approach though. :)
Log in to reply
for the last couple of years I was trying to solve Goldbach's conjuncture (even though I have no special mathematical skills nor did I ever do something mathematical beyond what was needed in school, and even there I had average ability at most (I'm currently 19)). during those last couple of years I tried reading as much as I could on prime numbers so that I will have a greater chance of understanding them. so I learned a few things in the process :) . even though I'm not mathematically skilled enough to explain it, I learned a bit about Prime number theorem. you can read about it on wikipedia or any kind of resource you may find online, I guarantee it will be more helpful than me in that case. btw if you are interested in prime numbers I think you should read about Riemann zeta function and it's use in Prime number theorem.
Log in to reply
@Daniel Magen – That's okay. I am not introduced to the prime number theorem, but given the intuition is established, your proof becomes a nice one. :)
Consider the function f : N → N that assigns to n number of primes between n and n + 1 0 0 0 . The problem asks us to understand the range of this function. To that end notice that f ( n ) − f ( n − 1 ) is always either 0 , 1 or − 1 (because the number of primes in the adjacent intervals can't differ by more than one -- prove this!). Therefore the range of f forms a set of consecutive integers.
The other part of the proof hangs on the existence of infinite gaps in primes. That is, there exist sets of consecutive integers of arbitrary length that contain no primes. It follows that in these regions our function f equals 0 . Finally, f ( 1 ) > 2 5 (since there are a lot of small primes). Putting these facts together with the observation of consecutive range from the first paragraph, the range of f includes all the numbers 0 ≤ n ≤ 2 5 and the answer is 2 6 .
Nicely done!
Funny how you ask the reader to prove something. That was your job :P
Log in to reply
It was very obvious though: in the process we gain at most one prime, or we lose at most one prime. :)
Case 1:
Consider the set of primes
P = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 }
And let X be the set of consecutive integers from 1 to 1 0 0 0 inclusive.
As ∣ P ∣ = 2 5 , and P is a subset of X , we have found a set of 1 0 0 0 consecutive integers containing exactly n primes, for 1 < = n < = 2 5 .
Case 2:
For n = 0 , consider the sequence of consecutive numbers
a i = { 1 0 0 1 ! + i }, where i goes from 2 to 1 0 0 1 inclusive.
As 2 < = i < = 1 0 0 1 , i is a common factor of 1 0 0 1 ! and i , thus the terms of a i are always composite and we have found 1 0 0 0 consecutive numbers containing 0 primes.
From case 1 and case 2 we conclude that there are 2 6 nonnegative integers n < = 2 5 containing exactly n primes.
The original post is incorrect. However Matt M's correction is a valid proof.
I don't follow your argument for Case 1 - the set X has exactly 168 primes in it so it's not an example of n = 2 5 or any lesser value of n , and P isn't a set of 1000 consecutive positive integers.
Log in to reply
I see, but I can´t find a way to remove the answer. Perhaps I'll have to ask an admin. Thanks.
Log in to reply
Case 1 can be fixed like this: if you have N . . . N + 1 0 0 0 with some number of primes n , then N + 1 . . . N + 1 0 0 1 must have n − 1 , n , or n + 1 primes, i.e. it can only change by one at a time. Since 1 . . . 1 0 0 0 has 1 6 8 primes, then as we consider every possible set of 1000 consecutive numbers until we get to Case 2, we must cover every possibility between 1 6 8 and 0 .
anyone knows which year this problem come from?
Log in to reply
We were told it was 2005. There were some edits to the actual question, to get it in the form of a numerical answer.
This is also a very common question to come across.
Problem Loading...
Note Loading...
Set Loading...
First, note that the number of primes < 1 0 0 0 is > 2 5 : one can calculate the first few primes, and note that the 2 6 t h prime is 1 0 1 , which is clearly < 1 0 0 0 , hence establishing our claim.
We now claim that all non-negative integers less than 2 5 satisfy the given condition. Let n be such an integer. Consider a larger positive integer k . Let m be the number of primes between k − 1 and k + 1 0 0 0 (boundaries excluded). Note that if we increase k by 1 , m will either not change at all, or will increase by 1 , or will decrease by 1 . This is obviously true, because in the process either we lose a prime or we gain one, or neither of these will happen.
Note that we can easily construct a sequence of 1 0 0 0 consecutive positive integers, none of which contain a prime. Let p 1 , p 2 , . . . , p x be the set of primes from 1 to 1 0 0 1 . Consider the sequence p 1 p 2 . . . p x + 2 , p 1 p 2 . . . p x + 3 , ⋯ , p 1 p 2 . . . p x + 1 0 0 1 . This sequence obviously satisfies the mentioned property.
Now suppose a and b are two positive integers for which m assumes the values c and d respectively. From our previous observation, for all positive integers n between c and d , we can find some y satisfying the given property. Since there exists a sequence of consecutive positive integers for which m takes the value 0 , all non-negative integers between 1 and 2 5 satisfy the given property. In conclusion, our answer is 2 6 .