For how many positive integers n are there exactly ⌊ 2 n ⌋ or ⌈ 2 n ⌉ primes less than or equal to n ?
Details and assumptions
Greatest Integer Function / Floor Function:
⌊
x
⌋
:
R
→
Z
refers to the greatest integer less than or equal to
x
. For example
⌊
2
.
3
⌋
=
2
and
⌊
−
5
⌋
=
−
5
.
Ceiling Function:
⌈
x
⌉
:
R
→
Z
refers to the smallest integer that is greater than or equal to to
x
. For example,
⌈
2
.
3
⌉
=
3
and
⌈
−
5
⌉
=
−
5
.
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.
Most solutions submitted for this problem were not well written and did not adequately justify their answers. Students often listed a set of 11 values of n that they claimed satisfied the relation and mentioned that for larger values of n it was not possible. It was then poorly (or not at all) justified why either of these was the case.
Log in to reply
Could we use the prime counting function properties here?
for n=14, floor(n)=7 and ceiling(n)=7. but there are only 6 primes before 15. now, everytime as n increases by 2, both floor and ceiling values increase by 1, but the number of primes less than n need not always increase and even if it does it does so by atmost 1. so any n>=14 cannot satisfy the condition. Hence, we have to check individually for numbers 1 to 13, for both floor and ceiling of n/2. We find that 1,2,3,....,8,9,11 and 13(11 numbers) satisfy the condition.
How does 1 satisfy the problem
Log in to reply
Because floor(1/2) = 0, so there are 0 prime less than or equal to 1. which satisfy the conditions. That was pretty tricky.
List down the first primes- 2, 3, 5, 7, 11, 13, 17, ... Notice that 7th prime(17) has an n/2 value of 8.5 which excludes it from the possible solutions. So the only solutions would be 1(0 prime), 2(1 prime), 3(2 primes) up to 9(4 primes), 11(5 primes) and 13(6 primes)
The solution space is enough for a brute force search. Observe that for n = 1 7 , there are 7 primes smaller or equal to it and ⌈ 2 1 7 ⌉ = 9 . For n ≥ 1 7 , each next prime is at least 2 larger than the previous so there are no more after 17. We then list all the numbers from 1 to 16 and check them all, finding that 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, and 13 are solutions.
We first calculate and find 11 numbers that fix the question: 1,2,3,4,5,6,7,8,9,11,13. We prove that for n>13 there will not be any numbers that satisfy the condition. First, if n is even then there will be 2 n even numbers that cannot be primes and the remain odd numbers can't be all primes (it already has 9). Odd number n is the same (the first is 15 and it has 2 odd numbers: 9 and 15 for all n ≥ 1 5 )
There are 8 where π(n) = the prime counting function = floor(n/2), 7 where it = ceiling(n/2) and 11 where it = one or the other.
n = 13 is the largest integer where any of the above occurs. For n = 14 or 15, there are only 6 primes <= n, and n/2 grows faster than π(n).
If n ≥ 1 5 , then all even integers ≤ n greater than 2 , 1 , 9 and 1 5 are not primes, so there will be less than ⌊ 2 n ⌋ primes. Thus, a simple check for n ≤ 1 5 shows that only n = 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 1 1 , 1 3 work, with a total of 1 1 numbers.
I have already solved this problem, 2 months 1 week ago!
how is 1 a prime number?
Log in to reply
Who said it is?
Actually one is neither prime nor composite...
13 is the 6th prime and 13/2 = 6.5
17 is the 7th prime and 17/2 = 8.5 so we don't need to check for n>=14.
from 1-13 there are 11 number (1,2,3,4,5,6,7,8,9,11,13)satisfy the condition.
Inspection shows that 1, 2, 3, 4, 5, 6, 7, 8, 9, 11 and 13 satisfy the required condition.
14, 15 and 16 have 6 primes less than or equal to them. Thus they don't follow the condition.
Assertion: If 2n-1 doesn't follow the condition, then 2n and 2n+1 don't follow the condition either, for all n>1
Proof: Define P(n) = Number of primes less than or equal to n.
1) 2n-1 doesn't follow the condition implies, P(2n-1) < \floor 2 n − 1 < \ceil 2 n − 1
2) P(2n-1) = P(2n) because 2n can't be prime. 3) \ceil 2 n − 1 = \floor 2 n = \ceil 2 n
This gives,
4) P(2n) < \floor 2 n = \ceil 2 n , hence 2n doesn't follow the condition.
5) P(2n+1) - P(2n-1) = 0 or 1. (If 2n+1 is prime then it's 1 else 0.) 6) \floor 2 n − 1 + 1 = \floor 2 n + 1 < \ceil 2 n + 1
This gives 7) P(2n+1) < \floor 2 n + 1 < \ceil 2 n + 1 , hence 2n+1 also doesn't satisfies the condition.
Now by induction all the integers beyond 15 don't follow the condition.
Let's look at the numbers one by one. The boldfaced numbers are prime themselves.
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13
That is a total of 11 numbers from 1 to 13 which meet the condition. Please note that 10 and 12 are not the solutions to the problem, hence don't feature in the list.
In the hope of finding more solutions, let's randomly pick 20 as our guess. There are 8 primes less than or equal to 20, which is two less than n/2[where n=20]...Now we claim that there are no solutions beyond this point. Let's see why:
In every pair of numbers we look at next, one of them is even, hence it can't be a prime. Thus we would want the odd number in the pair to be a prime, in order to keep up with the increasing . Going forward (after 13), primes start getting rare. That means we won't find as many prime numbers per (say) 10 numbers as you found them till this point. For example from 20 to 30, we come across only 2 primes (23 and 29) where as increases by 10. We should have added at least 5 primes so as to meet the condition, which clearly didn't happen. So the final answer to this question should be 11.
Please let me know if anything is flawed in the logic. Thanks. please give me some good many points..................thanking you......
Let's look at the numbers one by one. The boldfaced numbers are prime themselves.
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13
That is a total of 11 numbers from 1 to 13 which meet the condition. Please note that 10 and 12 are not the solutions to the problem, hence don't feature in the list.
In the hope of finding more solutions, let's randomly pick 20 as our guess. There are 8 primes less than or equal to 20, which is two less than n/2 . Now we claim that there are no solutions beyond this point. Let's see why:
In every pair of numbers we look at next, one of them is even, hence it can't be a prime. Thus we would want the odd number in the pair to be a prime, in order to keep up with the increasing . Going forward (after 13), primes start getting rare. That means we won't find as many prime numbers per (say) 10 numbers as you found them till this point. For example from 20 to 30, we come across only 2 primes (23 and 29) where as n increases by 10. We should have added at least 5 primes so as to meet the condition, which clearly didn't happen. So the final answer to this question should be 11.
Please let me know if anything is flawed in the logic. Thanks. Thanks once again..............
Only the numbers 1 to 9, 11, 13 verify th econdition !!!
Problem Loading...
Note Loading...
Set Loading...
We will prove that there are 1 1 values of n in which there are exactly ⌊ 2 n ⌋ or ⌈ 2 n ⌉ primes less than or equal to n .
First, we list the first 1 0 primes, which are: 2 , 3 , 5 , 7 , 1 1 , 1 3 , 1 7 , 2 3 , 2 9 , 3 1 .
The smallest prime number is 2 , so there ⌊ 2 1 ⌋ = 0 primes for n = 1 , which is true.
For even values of n where 2 ≤ n ≤ 8 , there are exactly 2 n prime numbers.
For odd values of n where 3 ≤ n ≤ 7 , there are ⌈ 2 n ⌉ prime numbers.
For n = 9 , 1 1 , 1 3 . there are ⌊ 2 n ⌋ = 4 prime numbers.
Now we shall prove that the maximum value of n is 1 3 : The next (7th) prime number is 1 7 , while for n = 1 4 , 1 5 , 1 6 , the values of ⌊ 2 n ⌋ and ⌈ 2 n ⌉ is equal to either 7 or 8 .
Similarly, ⌊ 2 1 7 ⌋ = 8 , which is greater than the number of prime numbers which is less than or equal to 1 7 .
Thus for n > 1 3 , ⌊ 2 n ⌋ is always greater than the number of primes less than or equal to n , since the distance between each prime number is generally becoming larger for n > 1 3 .