For a prime number p, the integers k such that √(k² - pk) is a positive integer are k = (p+1)²/4 and k = -(p-1)²/4. The solution requires that k² - pk be a perfect square, which leads to the conditions that k and k-p must both be perfect squares, and since p is prime, one of the factors in the difference of squares must equal 1 and the other must equal p.
Deep Dive
Voraussetzung
- Keine Daten verfügbar.
Nächste Schritte
- Keine Daten verfügbar.
Deep Dive
Find all integer k if sqrt(k^2 -pk) is a positive integer for prime p.Hinzugefügt:
Welcome to another video. This problem is from Spain. Let P be a prime number.
We need to find all K in the set of integers such that the square root of K^ 2 minus PK is a positive integer.
Now I know usually people who watch this channel a lot of people try the problem before watching the video or have alternative ways of getting to the answer. That is always heavily appreciated. Now usually I would just tell you what I was thinking and how I solved it. However, sometimes I don't say everything clearly because I assume some people know some things or some don't know. So whatever happens in this video, just leave a comment in the comment section. It is always appreciated. Be kind about it. Let's get into the video.
The first fact that we know about this problem is that whatever is under the radical has got to be positive. So k^ squ must be greater than pk every time. Or if k is negative, we're still going to get a positive value. We just want the value under the radical to not be negative. And it can also not be zero because we want our answer to be a positive integer and zero is not a positive integer. So those factors are there. I'm going to write them out, but I just wanted to say everything I'm thinking. I also know that this can be factored. So the problem with you getting a perfect square, oh, by the way, what's under the radical has got to be a perfect square.
But it looks very difficult to get a perfect square when you're doing subtraction or addition unless after factoring the two numbers. Let's look at this solution.
Note these are facts.
Okay. One, k^ 2 minus pk is greater than zero. That's number one.
Second one, k^ 2 minus pk is a square.
Is a perfect square.
But what makes this a little bit tricky is because we can factor this because if we factor k^ 2 minus pk look k * k minus p is a square. It can only be a square if k is a square and k minus p is a square because the only way k * k minus p can be a square well again k minus p is not the same thing as k so that's not a square so individually this and this must be a square and that gives us one clue p cannot be two Okay, there is no the smallest distance between any two perfect squares is three and that's between 1 and four. Any other set of perfect squares that are next to each other you you can see P is has to be a a much bigger number than two. So we know is a square.
This means P is not two cuz the smallest gap between perfect squares is three because K * K minus 2 will not be square and the square. Remember the two of them have got to be squares. Okay. Cannot be two since K and K minus P must be squares all the time.
So since P cannot be two and two is the only even prime every prime number we'll be dealing with now will be odd will be an odd prime. So therefore therefore P is an odd prime.
Okay so we can deal with three 57 and the rest of them. Okay. Now what is the second thing that I can tell you?
This is always positive. Okay. And there are two conditions for it to be I I'll come back and address it. Okay. We already know P cannot be two. So let's look at another fact that is very important to this proof. And it is that P does not divide K.
Okay? because if P divides K, we're going to get into trouble. Let's look at it again. Okay, another fact.
Okay, P is not a factor of K. Nothing can be a factor of P since P is a prime. But can P divide K? In any case, it it cannot. And let me show you why.
Suppose P divides K then K will be a multiple of P. Let's call it P PT. Okay, where T is an integer. T is an integer. Okay, if we say K is PT and T is an integer. See the problem with that?
K^ 2 minus KP will now become PT ^ 2 minus K sorry minus PT * P which gives you watch this P ^ 2 T ^ 2 minus P ^ 2 T.
Okay.
If we put this under the radical, this would be the same thing as p ^ 2 t * t minus one.
So note this p is a square which is perfect. That's what we want.
But t * t minus one cannot be a square because there are no you can multiply two consecutive numbers and get a perfect square. The only case is between zero and one. And if t is 1 and t minus one is zero everything becomes zero and we can't get our positive integer.
So this fact is established that P is not a factor of K because T * T minus one cannot be a square.
Okay, cuz they're consecutive integers, right? Okay, I just said it. I'm not stating it beyond that. So this is a contradiction to this supposition.
So we say therefore P does does not divide K. So now that we have taken care of all the tiny little details that could raise a question in our quest. We are going to go back to this fact that I raised that K * K minus P is a square.
And the only way the product of two numbers can be a square is if it is the same number you're multiplying or each of them is a square. Okay, don't ask me to prove that. Okay, I I don't have time for that. Okay, that's some exercises you should try to do. It's obvious. So this is going to be so since k * k minus p is a square and k is not equal to k minus p then k equ= a 2 and k - B = B ^2 for A B being integers.
Okay, that is a fact that we know each of them is a square and that's how we're going to build the rest of this um solution.
So now look at this.
If k is a squ and k minus p is b ^ 2, we can actually write both of them in terms of each other. So let's see um we can say that oh here since k is a 2 we can say a^2 - p = b ^ 2 which would mean um that p will be equal to a^ 2 - b^ 2 which will be a minus B * A + B. Oh, look. P= A - B * A + B. Remember that P is a prime number. You cannot write a prime number as the product of two numbers except itself and one. So, one of these must be P and one of these must be one.
Now you're asking, we're supposed to be looking for K. Yeah, as soon as we find P, we can find K because we know the relationship between P and K. So since P is prime, a minus B must be equal to 1 and A + B must be equal to P itself.
That is one option. We can switch the positions, but it should just be a case of plus or minus. That's just the difference. Let's work with this. Okay, so what do we get here? If a minus b equals 1 and a + b= p, we can eliminate.
Let's do elimination. If we add the two equations together, we get 2 a equals by adding p + 1.
So that gives us the impression or the answer that a must be p + 1 / 2.
That's it. Remember k = a 2. So k must be the square of this number. So we have K will be equal to P + 1 / 2 squared.
Okay.
So now that we've gotten a value for K, we have to try the alternative. Remember I said that A minus B is 1 because it looks like the smaller value and A + B is P. here. What if we switch it?
There's going to be a little problem which I'm going to address. So the alternative is you have a minus b and a + b. So if we say a + b is equal to 1.
Notice you cannot add two positive integers and get one. Impossible. One of them must be negative and the other positive. and the bigger number has to be the positive one. So you can just decide which of these numbers is the positive one for us to get one by adding them. So let's assume that a is a negative number. It has to be smaller than the value of b since b is positive.
So if this is -2, this has to be positive3 for us to get one. Right? So watch this. If a is smaller and it's negative, it's a negative number. A negative minus a positive is always a negative. So you expect that the right hand side will be p.
If you don't make that adjustment, what happens is you're going to get exactly the same answer as this and you're going to miss a solution.
Remember a and b are just integers. They could be positive or negative because their squares are what we needed. we just needed to square them. Okay. So this adjustment helps you fulfill the next action because now we can say if you add again you get 2 a. If we add the two equations will be equal to 1 - p. So that a = 1 - p / 2. Which means that a 2 will be equal to 1 - p over 2^ 2. But see the good thing about squaring a number you can change the switch the positions of one and p so it becomes p minus one. So we have k = a^ 2 and it's equal to p -1 / 2^ 2.
The problem with this second answer because of that assumption I made in this adjustment is if you're doing subtraction, you will end up having values of K that are less than P, which is not acceptable. The only way it is acceptable is if the value of K you're obtaining is negative.
So we say k has to be equal to the negative version of this p min -1 / 2^ squared. So if you want the positive value of k you use this. If you want the negative value of k you use this. Let's try p= 5 for both formulas and see if they work. So here if P is 5 we have P + 1 = 5 + 1 = 6 6 / 2 is 3 3 2 is 9. So when P is 5, K is 9. We test it. P is 5, K is 9. That's 45. And this is U K is 9.
That's going to be 81. 81 - 45 is 36.
That's a perfect square. That works.
Let's try it in this formula. We have 5 - 1 is 4. 4 / 2 is 2. 2 ^2 is 4. So p is 5. K is 4.
No, k is -4. So let's go put it here. If you put -4 here and you square it, you get 16. 16 - 5 * -4, that's 16 + 20.
That's 36. It works. So I if you check it and you find something else, I'll leave a comment or pin a comment. But I think this is the correct solution to this. If you use the minus, you put a minus here. If you use the plus, you put a plus here in front. So this is the positive K. That's the negative K.
Never stop learning. Those who stop learning, stop living. Bye-bye.
Ähnliche Videos
Olympiad Mathematics | Indian | Can You Solve This One?
PhilCoolMath
650 views•2026-06-03
Escaping the Fog
LogicLemurGaming
760 views•2026-06-03
A Brutal Radical Expression Made Easy! The Shortcut Changes Everything.
tamoshop
112 views•2026-06-02
V : jee main /advance class 11 mathematics : Binomial Theorem class-1 ( 29 may 2026 )
dcamclassesiitjeemainsadva9953
125 views•2026-05-29
Is This Pentomino Tileable?
3cycle
241 views•2026-05-30
This Sudoku Has Many Lines!!
CrackingTheCryptic
2K views•2026-05-29
Olympiad Mathematics | Indian Can You Solve This One?
PhilCoolMath
268 views•2026-06-02
Olympiad Mathematics | Indian | Can You Solve This?
PhilCoolMath
669 views•2026-06-02











