Floored by Primes

Algebra Level 5

For how many positive integers N N is N 2 5 \left \lfloor \frac {N^2}{5} \right \rfloor a prime?

Details and assumptions

The function x : R Z \lfloor x \rfloor: \mathbb{R} \rightarrow \mathbb{Z} refers to the greatest integer smaller than or equal to x x . For example 2.3 = 2 \lfloor 2.3 \rfloor = 2 and 5 = 5 \lfloor -5 \rfloor = -5 .

0 and 1 are not primes.


The answer is 3.

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.

23 solutions

Muhammad Al Kahfi
Jul 14, 2013

By taking modulo 5 5 , it's easy to see that N 2 0 , 1 , 1 ( m o d 5 ) N^2 \equiv 0, 1, -1 \pmod{5} . Then , since N 2 5 = p \lfloor \frac{N^2}{5} \rfloor = p , where p is prime number. Implies : p N 2 5 < p + 1 5 p N 2 < 5 p + 5 p \le \frac{N^2}{5} < p+1 \implies 5p \le N^2 < 5p + 5 . So, we have 3 cases for N. Case 1 : N 2 = 5 p N^2 = 5p Since p p is prime number. And 5 N 2 25 N 2 25 5 p 5 p . 5|N^2 \implies 25|N^2 \implies 25|5p \implies 5|p . So, p = 5 p = 5 . For this case, we obtain 1 solution. Case 2 : N 2 = 5 p + 1 N^2 = 5p + 1 Rewrite them as N 2 1 = ( N 1 ) ( N + 1 ) = 5 p N^2 - 1 = (N - 1)(N+1) = 5p . So, the possible value of N 1 N - 1 are 1 , 5 , p , 1, 5, p, and 5 p 5p . We divide into 4 4 subcase.

Subcase 1 : N 1 = 1 5 p = N + 1 = 3 N - 1 = 1 \implies 5p = N + 1 = 3 , not satisfied Subcase 2 : N 1 = 5 p = N + 1 = 5 + 2 = 7 N - 1 = 5 \implies p = N+1 = 5 + 2 = 7 Subcase 3 : N 1 = p N + 1 = 5 N = 4 N - 1 = p \implies N + 1 = 5 \implies N = 4 , and p = N 1 = 3 p = N - 1 = 3 Subcase 4 : N 1 = 5 p N + 1 = 1 N = 0 N - 1 = 5p \implies N + 1 = 1 \implies N = 0 , not satisfied

So, for this case, there are 2 2 solution. That is p = 7 p = 7 and p = 3 p = 3 . Case 3 : N 2 = 5 p + 4 N^2 = 5p + 4 Rewrite them as N 2 4 = ( N 2 ) ( N + 2 ) = 5 p N^2 - 4 = (N - 2)(N+2) = 5p . So, the possible value of N 2 N - 2 are 1 , 5 , p , 1, 5, p, and 5 p 5p . We divide into 4 4 subcase.

Subcase 1 : N 2 = 1 5 p = N + 2 = 5 p = 1 N - 2 = 1 \implies 5p = N + 2 = 5 \implies p = 1 , not possible Subcase 2 : N 2 = 5 p = N + 2 = 5 + 2 + 2 = 9 N - 2 = 5 \implies p = N+2 = 5 + 2 + 2 = 9 , not satisfied Subcase 3 : N 2 = p N + 2 = 5 N = 3 N - 2 = p \implies N + 2 = 5 \implies N = 3 , and p = N 2 = 1 p = N - 2 = 1 , not satisfied Subcase 4 : N 2 = 5 p N + 2 = 1 N = 1 N - 2 = 5p \implies N + 2 = 1 \implies N = -1 , not satisfied

So, for this case, there areno solution.

So, total from case 1 , 2 , 1, 2, and 3 3 we have 1 + 2 + 0 = 3 1 + 2 + 0 = \boxed{3} solution.

Jimmy Kariznov
Jul 14, 2013

Suppose N 2 5 = p \left\lfloor \dfrac{N^2}{5} \right\rfloor = p for some prime p p . Then, p N 2 5 < p + 1 p \le \dfrac{N^2}{5} < p+1 , and so, 5 p N 2 < 5 p + 5 5p \le N^2 < 5p+5 .

Since perfect squares must be 0 , 1 , 4 ( m o d 5 ) 0,1,4 \pmod{5} we only have 3 3 cases:

Case 1: N 2 = 5 p N^2 = 5p . For 5 p 5p to be a perfect square, we must have 5 p 5 \mid p . Since p p is prime, we get p = 5 p = 5 . Thus, the only solution in this case is N = 5 N = 5 .

Case 2: N 2 = 5 p + 1 N^2 = 5p+1 . For 5 p = N 2 1 = ( N 1 ) ( N + 1 ) 5p = N^2-1 = (N-1)(N+1) we must have N 1 = 1 , 5 , p , 5 p N-1 = 1, 5, p, 5p and N + 1 = 5 p , p , 5 , 1 N+1 = 5p, p, 5, 1 respectively. So, N = 2 = 5 p 1 N = 2 = 5p-1 , or N = 6 = p 1 N = 6 = p-1 , or N = p + 1 = 4 N = p+1 = 4 , or N = 5 p + 1 = 0 N = 5p+1 = 0 . The first and last of these are impossible. The 2nd and 3rd yield p = 7 p = 7 and p = 3 p = 3 which are both prime. Thus, the solutions in this case are N = 4 , 6 N = 4, 6 .

Case 3: N 2 = 5 p + 4 N^2 = 5p+4 . For 5 p = N 2 4 = ( N 2 ) ( N + 2 ) 5p = N^2-4 = (N-2)(N+2) we must have N 2 = 1 , 5 , p , 5 p N-2 = 1, 5, p, 5p and N + 2 = 5 p , p , 5 , 1 N+2 = 5p, p, 5, 1 respectively. So, N = 3 = 5 p 2 N = 3 = 5p-2 , or N = 7 = p 2 N = 7 = p-2 , or N = p + 2 = 3 N = p+2 = 3 , or N = 5 p + 2 = 1 N = 5p+2 = -1 . The first and last of these are impossible. The 2nd and 3rd yield p = 9 p = 9 and p = 1 p = 1 which are both not prime. Thus, there are no solutions in this case.

Therefore, the possible values of N N are 4 , 5 , 6 4,5,6 , a total of 3 3 values.

That's a great solution. Here's a tip: rather than writing "We must have N 1 = 1 , 5 , p , 5 p N-1=1,5,p,5p and N + 1 = 5 p , p , 5 , 1 N+1=5p,p,5,1 respectively.", I would suggest something like "We must have ( N 1 , N + 1 ) { ( 1 , 5 p ) , ( 5 , p ) , ( p , 5 ) , ( 5 p , 1 ) } (N-1,N+1)\in\{(1,5p),(5,p),(p,5),(5p,1)\} ".

Tim Vermeulen - 7 years, 11 months ago
Alex Yu
May 20, 2014

If n 2 5 = p \left\lfloor \dfrac{n^2}{5} \right\rfloor = p for some prime p p , then we must have that p n 2 5 < p + 1 5 p n 2 < 5 p + 5 p \leq \dfrac{n^2}{5} < p+1 \implies 5p \leq n^2 < 5p+5

Then clearly n 2 n^2 must be one of 5 p , 5 p + 1 , 5 p + 2 , 5 p + 3 , 5 p + 4 5p, 5p+1, 5p+2, 5p+3, 5p+4 . However, since 2 , 3 2, 3 are not quadratic residues modulo 5 5 , we have only three cases:

Case 1: n 2 = 5 p n^2 = 5p Then we have that 5 n 2 5 n 25 n 2 = 5 p 5 p 5 = p 5|n^2 \implies 5|n \implies 25 | n^2 = 5p \implies 5|p \implies 5=p . Then n 2 = 25 n = 5 n^2=25 \implies n=\boxed{5} .

Case 2: n 2 = 5 p + 1 n^2=5p+1 Then we have that n 2 1 = 5 p ( n 1 ) ( n + 1 ) = 5 p n^2-1 = 5p \implies (n-1)(n+1) = 5p . Since clearly p 5 p \neq 5 , we have either p < 5 p<5 or p > 5 p>5 .

If p < 5 p<5 , then n 1 = p , n + 1 = 5 n = 4 , p = 3 n-1=p, n+1=5 \implies n=\boxed{4}, p=3 .

If p > 5 p>5 , then n 1 = 5 , n + 1 = p n = 6 , p = 7 n-1=5, n+1=p \implies n=\boxed{6}, p=7 .

Case 2: n 2 = 5 p + 4 n^2=5p+4 Then n 2 4 = ( n 2 ) ( n + 2 ) = 5 p n^2-4 = (n-2)(n+2) = 5p . Clearly 5 p 5 \neq p , so we have similar two subcases:

If p < 5 p<5 then n 2 = p , n + 2 = 5 n = 3 , p = 1 n-2=p, n+2=5 \implies n=3, p=1 , but 1 1 is not a prime so this case fails.

If p > 5 p>5 then n 2 = 5 , n + 2 = p n = 7 , p = 9 n-2=5, n+2=p \implies n=7, p=9 but 9 9 is not a prime so this case fails.

Thus, the only values of n n are 4 , 5 , 6 4, 5, 6 yielding 3 \boxed{3} values of n n .

First we consider the case when N=5k. So we have N^2/5=5 k^2 wich is a prime number if and only if k=1. Now let us consider the general case N=5k+t, t={1,2,3,4} N^2/5=5 k^2+2k t+(t^2)/5. If t={1,2} the number what we want will be k (5k+2t) wich will ber prime if and only if k=1 and t=1. If t=3 we have 5 k^2+6k+1=(5k+1)(k+1) wich is never a prime number. If t=4 we have 5 k^2+8k+3=(5k+3)(k+1) wich is a prime number if and only if k=0. Answer:3 (N={4,5,6})

Mark Hennings
May 20, 2014

Let M be the integer part of N^2/5. Consider the different remainders N can have modulo 5. (1) If N=5a, then M=5a^2, which is only prime when a=1, so N=5. (2) If N=5a+1, then M=(5a + 2)a, which is only prime when a=1, so N=6. (3) If N=5a+2, then M=(5a + 4)a, which is never prime. (4) If N=5a-1, then M=(5a - 2)a, which is only prime when a=1, so N=4. (5) If N=5a-2, then M=(5a - 4)a, which is never prime. Thus there are 3 values of N - 4,5,6.

Shubham Agarwal
May 20, 2014

Consider N 2 N^2 is 5 p + t 5 * p + t , where t is {0, 1, 2, 3, 4} , and p is prime

first check for p = 2 (only even prime number) N 2 = 10 + t N^2 = 10 + t (not possible)

last digit of N 2 N^2 can be {0,1,4,9,6,5} and last digit of 5*p can be 5 hence there are only three values of t possible, which are {0,1,4}

case 1: t = 0 N 2 = 5 p N^2 = 5 * p \Rightarrow N = 5 and P = 5

case 2: t = 1 N 2 = 5 p + 1 N^2 = 5 * p + 1 \Rightarrow ( N 1 ) ( N + 1 ) = 5 p (N - 1) * (N + 1) = 5 * p \Rightarrow N = 4 , p=3 and N = 6 , p = 7

case 3: t = 4 N 2 = 5 p + 5 N^2 = 5 * p + 5 \Rightarrow ( N 2 ) ( N + 2 ) = 5 p (N - 2) * (N + 2) = 5 * p \Rightarrow N = 7, p not possible and N = 3 , p not possible

Hence there are total 3 solutions for N = 4 , 5 , 6 ans = 3

By taking modulo 5, it's easy to see that N 2 0 , 1 , 1 ( m o d 5 ) N^{2}\equiv 0,1,-1(mod5) . Then , since N 2 5 \left \lfloor \frac{N^{2}}{5} \right \rfloor , where p is prime number. Implies : p N 2 5 < p + 1 5 p N 2 < 5 p + 5 p\leq \frac{N^{2}}{5}<p+1 \rightarrow 5p \leq N^{2} < 5p+5 . So, we have 3 cases for N.

Case 1 : N 2 = 5 p N^{2}=5p Since p p is prime number. And

5 N 2 25 N 2 25 5 p 5 p 5 \mid N^{2} \rightarrow 25\mid N^{2} \rightarrow 25\mid 5p \rightarrow 5\mid p

So, p = 5 p=5 ,For this case we can get 1 solution

Case 2: N 2 = 5 p + 1 N^{2} =5p+1 Rewrite them as N 2 1 = ( N 1 ) ( N + 1 ) = 5 p N^{2} -1=(N-1)(N+1) =5p .So, the possible value of o f N 1 of N-1 are 1,5,p and 5p. we divide into 4 subcase. Subcase 1: N 1 = 1 5 p = N + 1 = 3 N-1=1 \rightarrow 5p=N+1=3 (not satisfied) subcase 2 : N 1 = 5 p = N + 1 = 5 + 2 = 7 N-1=5 \rightarrow p=N+1=5+2=7 subcase 3 : N 1 = p N + 1 = 5 N = 4 N-1=p \rightarrow N+1=5 \rightarrow N=4 ,and p = N 1 = 3 p=N-1=3 subcase 4: N 1 = 5 p N + 1 = 1 N = 0 N-1=5p \rightarrow N+1=1 \rightarrow N=0 (not satisfied)

For this case there are 2 solution .that is p = 7 a n d p = 3 p=7\quad and\quad p=3

Case 3 : N 2 = 5 p + 4 N^{2}=5p+4 Rewrite them as N 2 4 = ( N 2 ) ( N + 2 ) = 5 p N^{2}-4=(N-2)(N+2)=5p . So, the possible value of N 2 N-2 are 1,5,p, and 5p. We divide into 4 subcase.

Subcase 1 : N 2 = 1 5 p = N + 2 = 5 p = 1 N-2=1\rightarrow 5p=N+2=5\rightarrow p=1 ,(not possible) Subcase 2 : N 2 = 5 p = N + 2 = 5 + 2 + 2 = 9 N-2=5\rightarrow p=N+2=5+2+2=9 ,(not satisfied) Subcase 3 : N 2 = p N + 2 = 5 N = 3 , a n d p = N 2 = 1 N-2=p\rightarrow N+2=5\rightarrow N=3,\quad and\quad p=N-2=1 (not satisfied) Subcase 4 : N 2 = 5 p N + 2 = 1 N = 1 N-2=5p\rightarrow N+2=1\rightarrow N=-1 (not satisfied)

So, for this case, there are no solution.

So, total from case 1,2, and 3 we have 3 solution.

Douglas Zare
May 20, 2014

Let n = 5 k + i n=5k+i , for i { 0 , 1 , 2 , 3 , 4 } i\in\lbrace0,1,2,3,4\rbrace . Let f ( n ) = n 2 / 5 f(n) = \lfloor n^2/5 \rfloor .

f ( 5 k ) = 5 k 2 f(5k) = 5k^2 , which is only prime for k=1.

f ( 5 k + 1 ) = 5 k 2 + 2 k = k ( 5 k + 2 ) f(5k+1) = 5k^2+2k = k(5k+2) , which is only prime for k=1.

f ( 5 k + 2 ) = 5 k 2 + 4 k = k ( 5 k + 4 ) f(5k+2) = 5k^2+4k = k(5k+4) , which is never prime.

f ( 5 k + 3 ) = 5 k 2 + 6 k + 1 = ( 5 k + 1 ) ( k + 1 ) f(5k+3) = 5k^2+6k+1 = (5k+1)(k+1) , which is never prime.

f ( 5 k + 4 ) = 5 k 2 + 8 k + 3 = ( 5 k + 3 ) ( k + 1 ) f(5k+4) = 5k^2+8k+3 = (5k+3)(k+1) , which is only prime when k=0.

So, there are only 3 values of n for which f(n) is prime: 4, 5, and 6.

A perfect square can only have a remainder of 0,1 or 4 considering modulo 5. Case 1: N^2=5p, p is a prime number. it is easy to see that p is a multiple of 5, which leads to p=5 since p is a prime number. This gives N=5. Case 2: N^2=5p+1, p is a prime number. Then 5p=(N-1)(N+1). Hence (N-1,N+1)=(1,5p),(p,5) or (5,p) This gives p=3 or p=7, then N=4 or N=6. Case 3: N^2=5p+4, p is a prime number. Then 5p=(N-2)(N+2). Hence (N-2,N+2)=(1,5p),(p,5) or (5,p) This gives no prime number solution, so there is no solution this case. Therefore the answer is 3.

Kiriti Mukherjee
Jul 16, 2013

Suppose , N = 5 x + k N = 5x +k where k k∈ { 0 , ± 1 , ± 2 0,\pm 1,\pm 2 }. So, N 2 5 = 25 x 2 + 10 x k + k 2 5 = 5 x 2 + 2 x k + k 2 5 = x ( 5 x + 2 k ) \left \lfloor \frac{N^2}{5} \right \rfloor = \left \lfloor \frac{25x^2 + 10xk + k^2}{5} \right \rfloor = \left \lfloor 5x^2 + 2xk +\frac{ k^2}{5} \right \rfloor = x(5x +2k) (Because k 2 < 5 k^2 < 5 )

Now if x ( 5 x + 2 k ) x(5x+2k) is a prime number x x must be 1 1 . There are only 5 5 values of k k .only 3 \boxed 3 of them will be prime

Kiriti Mukherjee - 7 years, 11 months ago

There are several problems with your solution. I'll point them out one by one.

1) You never said what x x was. While you're writing proofs, you should never leave anything undefined. What is x x ? Is x x an integer? Is it a fraction? By the way it is possible for N N to be a positive integer even with x x being a fraction. Let x x be 4 5 \frac{4}{5} and k k be 0 0 . Then N = 4 N=4 which is a valid solution,

2) Towards the end, you said that x x must be 1 1 . That is not true. I've shown you an example of that in the paragraph above.

3) I noticed that your x ( 5 x + 2 k ) x(5x+2k) became x ( 5 x 2 k ) x(5x-2k) . That might be a typo. But it is an error nevertheless.

This solution discussion system is an opportunity for us to learn and improve our proof writing. There are some great solutions on this thread. Take your time and notice the different approaches and techniques. After all this is what this system is all about!

Sorry for the long post!

Mursalin Habib - 7 years, 11 months ago

Log in to reply

Sorry , It was a typing mistake on x ( 5 x 2 k ) x(5x-2k) .

I think that it is important to discover the accurate proof , the skill of writing proof comes latter... ( that is a common sense that x x should be an integer).

It is the difference between exam and brilliant...............................

Kiriti Mukherjee - 7 years, 11 months ago
Mursalin Habib
Jul 14, 2013

Let's assume N 2 5 = P \lfloor \frac{N^2}{5}\rfloor=P where P P is a prime.

Notice that if N 2 = 5 P + r N^2=5P+r where 0 r < 5 0\leq r<5 [ r r is obviously an integer],

N 2 5 = 5 P + r 5 = 5 P 5 + r 5 = 5 P 5 + r 5 \lfloor \frac{N^2}{5}\rfloor=\lfloor \frac{5P+r}{5}\rfloor=\lfloor \frac{5P}{5}+\frac{r}{5}\rfloor=\lfloor \frac{5P}{5}\rfloor+\lfloor \frac{r}{5}\rfloor

[Since 5 P 5 \frac {5P}{5} is an integer, we can 'break up' the floor function].

= P + 0 = P =\lfloor P\rfloor+0=P .

Notice that any perfect square has a units digit of 0 , 1 , 4 , 5 , 6 0, 1, 4, 5, 6 or 9 9 . Another way of saying that is any perfect square can be written as 5 x 5x , 5 x + 1 5x+1 or 5 x + 4 5x+4 . That means we have three values of r r which are 0 0 , 1 1 & 4 4 . That gives us three cases to consider.

Case 1 1 : N 2 = 5 P N^2=5P

For 5 P 5P to be a perfect square, 5 5 has to be a factor of P P . Since P P is prime, the only prime number that has 5 5 as its factor is 5 5 .

That means P = 5 P=5 and N = 25 = 5 N=\sqrt{25}=5 .

So here the only possible value of N N is 5 5 .

Case 2 2 : N 2 = 5 P + 1 N^2=5P+1

That would imply N 2 1 = 5 P ( N + 1 ) ( N 1 ) = 5 P N^2-1=5P \Rightarrow (N+1)(N-1)=5P .

The only factors of 5 P 5P are 1 , 5 , P 1, 5, P and 5 P 5P . And for any N N , ( N + 1 ) > ( N 1 ) (N+1)>(N-1) .

So the possible combinations of ( N + 1 , N 1 ) (N+1, N-1) are ( 5 P , 1 ) , ( P , 5 ) , ( 5 , P ) (5P, 1), (P,5), (5,P) . The first combination is impossible because it would mean 3 = 5 P 3=5P .

The second and the third combination imply P = 7 P=7 & P = 3 P=3 respectively. Both of them are primes and therefore valid.

P = 7 P=7 gives us N = 5 × 7 + 1 = 6 N=\sqrt{5\times7+1}=6 .

P = 3 P=3 gives us N = 5 × 3 + 1 = 4 N=\sqrt{5 \times 3+1}=4 .

So Case 2 2 gives us two values of N N . They are 4 4 and 6 6

Case 3 3 : N 2 = 5 P + 4 N^2=5P+4

This case tells us N 2 4 = 5 P ( N + 2 ) ( N 2 ) = 5 P N^2-4=5P \Rightarrow (N+2)(N-2)=5P . We can use the similar reasoning from Case 2 2 to determine that the possible combinations of ( N + 2 , N 2 ) (N+2, N-2) are ( 5 P , 1 ) , ( 5 , P ) , ( P , 5 ) 5P, 1),(5,P), (P,5) .

The first and second combinations give us P = 1 P=1 . The last one gives P = 9 P=9 . None of these are primes.

There are no more cases to consider. So N = 5 , 6 , 4 N=5, 6, 4 which gives us a total of 3 3 positive integers.

Thomas Beuman
Jul 16, 2013

It is always possible to write N = 5 m + k N = 5m+k with k { 2 , 1 , 0 , 1 , 2 } k \in \{-2,-1,0,1,2\} . We find

N 2 = ( 5 m + k ) 2 = 25 m 2 + 10 m k + k 2 N^2 = (5m+k)^2 = 25m^2 + 10mk + k^2 .

Since k 2 < 5 k^2 < 5 , it follows that

1 5 N 2 = 5 m 2 + 2 m k + 1 5 k 2 = 5 m 2 + 2 m k = m ( 5 m + 2 k ) \lfloor \frac15 N^2 \rfloor = \lfloor 5m^2 + 2mk + \frac15 k^2 \rfloor = 5m^2 + 2mk = m(5m+2k) .

It is now easy to see that 1 5 N 2 \lfloor \frac15 N^2 \rfloor can only be prime for m = 1 m = 1 . This leaves us only five numbers to check, of which three ( N = 4 , N = 5 , N = 6 N=4,N=5,N=6 ) turn out to give a prime.

Apart from the little omission that Mursalin Habib pointed out, i.e. not stating the requirement for m to be an integer, that is a very nice solution.

Peter Byers - 5 years, 6 months ago

It is really important to point out that m m is an integer. Otherwise you can't 'break up' the floor function like you did on the fourth line.

It is not true that the only possible value of m m is 1 1 . Take m = 6 5 m=\frac{6}{5} and k = 1 k=-1 . Then N N is equal to 5 5 which is a valid solution.

Mursalin Habib - 7 years, 11 months ago
Michael Lee
Jul 14, 2013

From the definition of the mod operator, we know that a m o d b = a b a b a \bmod b = a - b\lfloor \frac{a}{b}\rfloor . Thus, N 2 5 = N 2 5 1 5 ( N 2 m o d 5 ) \lfloor \frac{N^2}{5} \rfloor = \frac{N^2}{5} - \frac{1}{5}({N^2} \bmod 5)

For N = 5 k + 1 N = 5k+1 :

N 2 5 1 5 ( N 2 m o d 5 ) = 5 k 2 + 2 k = k ( 5 k + 2 ) \frac{N^2}{5} - \frac{1}{5}({N^2} \bmod 5) = 5k^2 + 2k = k(5k+2) , which is only prime for k = 1 k = 1 , which provides our first solution, N 2 5 = 7 N = 6 \lfloor \frac{N^2}{5} \rfloor = 7 \Rightarrow N = 6

For N = 5 k + 2 N = 5k+2 :

N 2 5 1 5 ( N 2 m o d 5 ) = 5 k 2 + 4 k = k ( 5 k + 4 ) \frac{N^2}{5} - \frac{1}{5}({N^2} \bmod 5) = 5k^2 + 4k = k(5k+4) , which is never prime (even k = 1 k = 1 still provides N 2 5 = 9 \lfloor \frac{N^2}{5} \rfloor = 9 ).

For N = 5 k + 3 N = 5k+3 :

N 2 5 1 5 ( N 2 m o d 5 ) = 5 k 2 + 6 x + 1 = ( k + 1 ) ( 5 k + 1 ) \frac{N^2}{5} - \frac{1}{5}({N^2} \bmod 5) = 5k^2+6x+1 = (k+1)(5k+1) , which is also never prime.

For N = 5 k + 4 N = 5k+4 :

N 2 5 1 5 ( N 2 m o d 5 ) = 5 k 2 + 8 k + 3 = ( k + 1 ) ( 5 k + 3 ) \frac{N^2}{5} - \frac{1}{5}({N^2} \bmod 5) = 5k^2 + 8k + 3 = (k+1)(5k+3) , which is only prime for k = 0 k = 0 , which provides our second solution, N 2 5 = 3 N = 4 \lfloor \frac{N^2}{5} \rfloor = 3 \Rightarrow N = 4

For N = 5 k N = 5k :

N 2 5 1 5 ( N 2 m o d 5 ) = 5 k 2 \frac{N^2}{5} - \frac{1}{5}({N^2} \bmod 5) = 5k^2 , which is only prime for k = 1 k = 1 , which provides our third and final solution, N 2 5 = 5 N = 5 \lfloor \frac{N^2}{5} \rfloor = 5 \Rightarrow N = 5

Lucas Reis
Jul 15, 2013

Let N = 5 q + r N=5q+r , 0 r 4 0\le r\le 4 and f ( N ) = N 2 5 f(N)=\lfloor\frac{N^2}{5}\rfloor

Thus we have N 2 = 25 q 2 + 10 q r + r 2 N^2=25q^2+10qr+r^2 , where f ( N ) = N 2 5 = 5 q 2 + 2 q r + r 2 f(N)=\lfloor\frac{N^2}{5}\rfloor=5q^2+2qr+\lfloor r^2\rfloor .

We have two cases to analyze:

q = 0 q=0 , where N = r = 1 , 2 , 3 , 4 N=r=1, 2, 3, 4 and it's easy to see that N 2 5 \lfloor\frac{N^2}{5}\rfloor is a prime number only for N = 4 N=4 .

q > 0 q>0

If r = 0 r=0 , we have f ( N ) = 5 q 2 f(N)=5q^2 and q 2 f ( N ) q^2|f(N) , a prime number. Then q = 1 f ( N ) = 5 q=1 \Rightarrow f(N)=5 and N = 5 N=5 it's a solution.

If r = 1 r=1 , we have f ( N ) = 5 q 2 + 2 q = q ( 5 q + 2 ) f(N)=5q^2+2q=q(5q+2) and if q > 1 q>1 , we have 1 < q < 5 q + 2 1<q<5q+2 , contradiction with f ( N ) f(N) to be a prime number, where q = 1 f ( N ) = 7 q=1 \Rightarrow f(N)=7 and N = 6 N=6 it's a solution.

If r = 2 r=2 , we have f ( N ) = 5 q 2 + 4 q f(N)=5q^2+4q , and by a argument like the previous, we have q = 1 f ( N ) = 9 q=1\Rightarrow f(N)=9 that it's not a prime number. So we don't have any solution.

If r = 3 r=3 , we have f ( N ) = 5 q 2 + 6 q + 1 = ( 5 q + 1 ) ( q + 1 ) f(N)=5q^2+6q+1=(5q+1)(q+1) and q + 1 , 5 q + 1 > 1 q+1, 5q+1>1 . So f ( N ) f(N) cannot be a prime number.

If r = 4 r=4 , we have f ( N ) = 5 q 2 + 8 q + 3 = ( 5 q + 3 ) ( q + 1 ) f(N)=5q^2+8q+3=(5q+3)(q+1) and q + 1 , 5 q + 3 > 1 q+1, 5q+3>1 . So f ( N ) f(N) cannot be a prime number.

Thus we have 3 3 values: N = 4 , 5 , 6 N=4, 5, 6 .

Ang Yan Sheng
Jul 20, 2013

Note that ( 5 n 2 ) 2 5 = 25 n 2 20 n 5 + 4 5 = ( 5 n 4 ) n ( 5 n 1 ) 2 5 = 25 n 2 10 n 5 + 1 5 = ( 5 n 2 ) n ( 5 n ) 2 5 = 25 n 2 5 = ( 5 n ) n ( 5 n + 1 ) 2 5 = 25 n 2 + 10 n 5 + 1 5 = ( 5 n + 2 ) n ( 5 n + 2 ) 2 5 = 25 n 2 + 20 n 5 + 4 5 = ( 5 n + 4 ) n \begin{aligned} \left\lfloor\frac{(5n-2)^2}5\right\rfloor&=\left\lfloor\frac{25n^2-20n}5+\frac45\right\rfloor=(5n-4)n\\ \left\lfloor\frac{(5n-1)^2}5\right\rfloor&=\left\lfloor\frac{25n^2-10n}5+\frac15\right\rfloor=(5n-2)n\\ \left\lfloor\frac{(5n)^2}5\right\rfloor&=\left\lfloor\frac{25n^2}5\right\rfloor=(5n)n\\ \left\lfloor\frac{(5n+1)^2}5\right\rfloor&=\left\lfloor\frac{25n^2+10n}5+\frac15\right\rfloor=(5n+2)n\\ \left\lfloor\frac{(5n+2)^2}5\right\rfloor&=\left\lfloor\frac{25n^2+20n}5+\frac45\right\rfloor=(5n+4)n \end{aligned} Hence for all n 2 n\geq2 and N { 5 n 2 , 5 n 1 , 5 n , 5 n + 1 , 5 n + 2 } N\in\{5n-2,5n-1,5n,5n+1,5n+2\} , N 2 5 \left\lfloor\frac{N^2}5\right\rfloor can be factored as a product of two numbers, each greater than 2 (since 5 n 4 2 5n-4\geq2 ). Thus N 2 5 \left\lfloor\frac{N^2}5\right\rfloor is composite for all N 8 N\geq8 .

Checking for N { 1 , 2 , , 7 } N\in\{1,2,\ldots,7\} , we see that N 2 5 \left\lfloor\frac{N^2}5\right\rfloor is prime if and only if N = 4 , 5 , 6 N=4,5,6 . Hence there are 3 \boxed{3} values of N N such that N 2 5 \left\lfloor\frac{N^2}5\right\rfloor is prime.

Russell Few
Jul 15, 2013

Lemma: For all x 2 ) , ( 5 x + m ) 2 5 x \ge 2 )\ , \lfloor{\frac{(5x+m)^2}{5}}\rfloor where m 2 , 1 , 0 , 1 , 2 m \in {-2, -1, 0, 1, 2} is divisible by k k .

It suffices to show that ( 5 x + m ) 2 n ( m o d 5 ) (5x+m)^2 \cong n (mod 5) where m 2 , 1 , 0 , 1 , 2 m \in {-2, -1, 0, 1, 2} and n 0 , 1 , 2 , 3 , 4 n \in {0, 1, 2, 3, 4} because that would mean that ( 5 x + m ) 2 5 0 ( m o d n ) \lfloor{\frac{(5x+m)^2}{5}}\rfloor \cong 0 (mod n)

Note that ( 5 x + m ) 2 = 25 x 2 + 5 x m + m 2 0 + 0 + m 2 m 2 ( m o d 5 x ) (5x+m)^2=25x^2+5xm+m^2 \cong 0+0+m^2 \cong m^2 (mod 5x) . Since m 2 , 1 , 0 , 1 , 2 m \in {-2, -1, 0, 1, 2} , m 2 q ( m o d 5 x ) m^2 \cong q (mod 5x) where q 0 , 1 , 4 q \in {0,1,4} . Since all 0 , 1 , 4 0,1,4 is a subset of 0 , 1 , 2 , 3 , 4 0, 1, 2, 3, 4 , ( 5 x + m ) 2 n ( m o d 5 ) (5x+m)^2 \cong n (mod 5) where m 2 , 1 , 0 , 1 , 2 m \in {-2, -1, 0, 1, 2} and n 0 , 1 , 2 , 3 , 4 n \in {0, 1, 2, 3, 4} .

Let f ( x ) = N 2 5 f(x)=\lfloor{\frac{N^2}{5}}\rfloor

Thus, f ( 8 ) f(8) , f ( 9 ) f(9) , f ( 10 ) f(10) , f ( 11 ) f(11) and f ( 12 ) f(12) are divisible by 2 2 ; f ( 13 ) f(13) , f ( 14 ) f(14) , f ( 15 ) f(15) , f ( 16 ) f(16) , f ( 17 ) f(17) are divisible by 3 3 , and so on. Note also that it is obvious that f(5x-2)>x, so none of f(x) where x 8 x \ge 8 is prime. Hence we just have to test the cases where x 7 x \le 7

Here are the values of x x and f ( x ) f(x) where x 7 x \le 7 .

For x = 1 , 2 , 3 , 4 , 5 , 6 , 7 x=1, 2, 3, 4, 5, 6, 7 , f ( x ) = 0 , 0 , 1 , 3 , 5 , 7 , 9 f(x)=0, 0, 1, 3, 5, 7, 9 respectively.

Out of the f ( x ) f(x) , only f ( 4 ) = 3 f(4)=3 , f ( 5 ) = 5 f(5)=5 , and f ( 6 ) = 7 f(6)=7 are prime.

Hence, for 3 \boxed{3} positive integers N N , N 2 5 \lfloor{\frac{N^2}{5}}\rfloor is prime.

nice approach russell...

Muhammad Al Kahfi - 7 years, 11 months ago

( 5 x + m ) 2 n ( m o d 5 ) (5x+m)^2 \cong n(mod 5) should be ( 5 x + m ) 2 n ( m o d 5 n ) (5x+m)^2 \cong n(mod 5n)

Russell FEW - 7 years, 11 months ago
Daniel Chiu
Jul 15, 2013

The given equation is p = N 2 5 p=\left\lfloor\frac{N^2}{5}\right\rfloor To remove the floor (greatest integer) function, we can make it so that N 2 5 \frac{N^2}{5} is always an integer, and we can do that by subtracting a variable, say α \alpha , from the numerator. We know that α { 0 , 1 , 2 , 3 , 4 } \alpha\in\{0,1,2,3,4\} since the denominator is 5. After multiplying by 5, our equation becomes 5 p = N 2 α 5p=N^2-\alpha We can further shrink the possibilities for α \alpha by finding the quadratic residues modulo 5. They are 0,1, and 4, so the possibilities for α \alpha are 0, 1, and 4. Now, we have 3 cases:

Case 1: α = 0 \alpha=0

We have 5 p = N 2 5p=N^2 This implies 5 p 5|p , and since p p is a prime, p = 5 p=5 . Therefore, N = 5 N=5 is our only possibility in this case.

Case 2: α = 1 \alpha=1

We have 5 p = N 2 1 = ( N 1 ) ( N + 1 ) 5p=N^2-1=(N-1)(N+1) The factors of 5 p 5p are 1,5, p p , and 5 p 5p . Either N 1 N-1 is 1, or the lesser of 5 and p p . If N 1 = 1 N-1=1 , N = 2 N=2 and that doesn't work. Therefore, N 1 = 5 N-1=5 or N + 1 = 5 N+1=5 . Checking, we find that both N = 4 N=4 and N = 6 N=6 work, for two possibilities in this case.

Case 3: α = 4 \alpha=4

We have 5 p = N 2 4 = ( N 2 ) ( N + 2 ) 5p=N^2-4=(N-2)(N+2) Similarly to Case 2, N 2 N-2 is either 1 or the lesser of 5 and p p . If N 2 = 1 N-2=1 , p = 1 p=1 , so that doesn't work. Therefore, N 2 = 5 N-2=5 or N + 2 = 5 N+2=5 . Checking, neither give p p prime, so there are no solutions in this case.

The 3 solutions are N = 4 N=4 , N = 5 N=5 , and N = 6 N=6 .

Owen Scott
May 20, 2014

F = floor( N^2 / 5 )

N = {3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18}

F = {1 3 5 7 9 12 16 20 24 28 33 39 45 51 57 64}

difference between F terms is 2 2 2 2 3 4 4 4 4 5 6 6 6 6 7 8 8 8 8 ... and so on. There are a few cool things about this sequence of differences.

First, after all the 2 2 2 2, we are at 9. We add 3. That is divisible by 3.

Next, we add 1 1 1 1 mod3, then add 2 mod3. That is divisible by 3.

Next, we add 2 2 2 2 mod, then add 1mod3. That is divisible by 3.

Every time we add an odd step up, the result is divisible by 3. Now, let's look at the even patterns.

The 4 4 4 4 just make even numbers. So divisible by 2 The 6 6 6 6 just make numbers divisible by 3. That's still good. The 8 8 8 8 just make even numbers. So divisible by 2 The 10 10 10 10 make numbers divisible by 5 The 12 12 12 12 make numbers divisible by 2. The 14 14 14 14 make numbers divisible by 3.

And the pattern continues. Therefore, the only prime ones occur at n = 4,5,6. All above these are divisible by 2 or 3 or 5.

This is an extremely brute force way of doing it. Sorry, I'm not very good at proving things. I just like patterns. I also think you might want to take away the solutions given at the bottom of the page in the discussion if you ask someone for a submission for points, because it would be very easy to just copy an elegant solution below.

When N=36, F=259, so not all of these numbers are divisible by 2,3, or 5.

Calvin Lin Staff - 7 years ago
Michael Tang
Jul 20, 2013

Note that we must have N 2 5 2 \left\lfloor \dfrac{N^2}{5} \right \rfloor \ge 2 or N 4. N \ge 4. Now we take cases based on the residue of N ( m o d 5 ) . N \pmod 5.


  • Case 1: N 0 ( m o d 5 ) N \equiv 0 \pmod 5

Let N = 5 a N = 5a for some integer a . a. Because N 4 , N \ge 4, a a is also positive. Then we have N 2 5 = 25 a 2 5 = 5 a 2 . \left\lfloor \frac{N^2}{5} \right \rfloor = \left\lfloor \frac{25a^2}{5} \right \rfloor = 5a^2. This means that a = 1 a = 1 and N = 5 , N = 5, which is the only value found here.

  • Case 2: N 1 ( m o d 5 ) N \equiv 1 \pmod 5

Let N = 5 a + 1 N = 5a+1 (again for some positive integer a a ). Then N 2 5 = 25 a 2 + 10 a + 1 5 = 5 a 2 + 2 a = a ( 5 a + 2 ) . \left\lfloor \frac{N^2}{5} \right \rfloor = \left\lfloor \frac{25a^2+10a+1}{5} \right \rfloor = 5a^2+2a = a(5a+2). For this expression to be prime, one of the factors in the product must equal 1. 1. If a = 1 , a = 1, then N = 6 , N = 6, which indeed works. However, 5 a + 2 5a+2 cannot equal 1 1 because then a ( 5 a + 2 ) a(5a+2) would not be an integer (it is the floor of a real number). So, the only value from this case is N = 6. N = 6.

  • Case 3: N 2 ( m o d 5 ) N \equiv 2 \pmod 5

Let N = 5 a + 2 , N = 5a+2, so that N 2 5 = 25 a 2 + 20 a + 4 5 = 5 a 2 + 4 a = a ( 5 a + 4 ) . \left\lfloor \frac{N^2}{5} \right \rfloor = \left\lfloor \frac{25a^2+20a+4}{5} \right \rfloor = 5a^2+4a = a(5a+4). a = 1 , N = 7 a = 1, N = 7 doesn't work (it gives 9 9 ). Taking 5 a + 4 = 1 5a+4 = 1 makes a ( 5 a + 4 ) a(5a+4) non-integral, so it doesn't work. Thus, there are no values of N N in this case.

  • Case 4: N 3 2 ( m o d 5 ) N \equiv 3 \equiv -2 \pmod 5

Let N = 5 a 2 , N = 5a-2, which gives N 2 5 = 25 a 2 20 a + 4 5 = 5 a 2 4 a = a ( 5 a 4 ) . \left\lfloor \frac{N^2}{5} \right \rfloor = \left\lfloor \frac{25a^2-20a+4}{5} \right \rfloor = 5a^2-4a = a(5a-4). Setting either factor equal to 1 1 gives N = 3 , N = 3, which contradicts our statement that N 4. N \ge 4. So, there are no values in this case either.

  • Case 5: N 4 1 ( m o d 5 ) N \equiv 4 \equiv -1 \pmod 5

If N = 5 a 1 , N = 5a-1, then N 2 5 = 25 a 2 10 a + 1 5 = 5 a 2 2 a = a ( 5 a 2 ) . \left\lfloor \frac{N^2}{5} \right \rfloor = \left\lfloor \frac{25a^2-10a+1}{5} \right \rfloor = 5a^2-2a=a(5a-2). If a = 1 , a = 1, then N = 4 , N = 4, which works. It 5 a 2 = 1 , 5a-2 = 1, then a ( 5 a 2 ) a(5a-2) is not an integer. Therefore, N = 4 N = 4 is our last value of N . N.


In conclusion, the only possible values of N N are N = 4 , 5 , 6 , N = 4, 5, 6, so there are 3 \boxed{3} positive integers such that N 2 5 \left\lfloor \dfrac{N^2}{5} \right \rfloor is prime.

Harsa Mitra
Jul 17, 2013

Use this simple code in mathematica we see that only numbers 4;5;6 only satisfy the condition. u can change 1000 to any number for your own choice......result would be same For[i = 2, i < 1000, i++, Print[{Element[Floor[i^2/5], Primes], i}]] so answer is 3

How do you know the result would be the same?

Matt Enlow - 7 years, 10 months ago
David Nolasco
Jul 16, 2013

We can show that every floor of n 2 5 \frac{n^{2}}{5} is not a prime except for n = 4, 5, and 6.

Of course the most convenient technique used is none other then Trial and Error

... So you tried all natural numbers, and those were the only three that worked?

Matt Enlow - 7 years, 10 months ago
Megh Parikh
Jul 16, 2013

We make cases, let N be **Case 1: (5k \Rightarrow

Tung Nguyen Khac
Jul 16, 2013

Let N = 5 k + q N = 5k + q ; q = 0 , 1 , 2 , 3 , 4 q = 0,1,2,3,4 ; k > = 0 k >= 0 .

If N = 5 k N = 5k , ( N 2 ) ( 5 ) = 5 k 2 \frac(N^{2})(5) = 5k^{2} . Hence, k = 1 k = 1 or N = 5 N = 5 is an answer. If N = 5 k + 1 N = 5k + 1 , ( N 2 ) ( 5 ) = k ( 5 k + 2 ) \frac(N^{2})(5) = k(5k+2) . Hence, k = 1 k = 1 or N = 6 N = 6 is an answer. If N = 5 k + 2 N = 5k + 2 , ( N 2 ) ( 5 ) = k ( 5 k + 4 ) \frac(N^{2})(5) = k(5k+4) . Hence, no answer. If N = 5 k + 3 N = 5k + 3 , ( N 2 ) ( 5 ) = ( k + 1 ) ( 5 k + 1 ) \frac(N^{2})(5) = (k+1)(5k+1) . Hence, no answer. If N = 5 k + 4 N = 5k + 4 , ( N 2 ) ( 5 ) = ( k + 1 ) ( 5 k + 3 ) \frac(N^{2})(5) = (k+1)(5k+3) . Hence, k = 0 k = 0 or N = 3 N = 3 is an answer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...