## Proving something cant be written as a square

 Quote by Millennial Yes, I think I made a mistake there. I used another logic this time and came up with a contradiction. I won't post it here, I will tell you what kind of a contradiction it is. Try to obtain it yourself. Contradiction: Let n be the number which gives the expression you gave when squared. Then, n can't be divided by p. However, either n-4 and n+1, or n-2 and n-1 are divisable by p. From here, it is easy to see that only the first case can be valid where p is 5. However, with some effort you can show that a perfect square can be written as 5x+1 if and only if the number to be squared is in the form 5y+1. Since this can't hold with your expression (because if it did, n+1 would not be divisable by 5), we achieve a contradiction.
Sir I tried it day and night sir. I would be extremely happy if you can post it here.
 I used modular arithmetic this time, along with reductio ad absurdum. Here is the first thing I did. I used the properties of the expression you gave as follows: $$n^2=p^{m+a}-p^m+3p^a+1$$ $$n^2-1=(n-1)(n+1)=p^{m+a}-p^m+3p^a=p^a(p^m-p^{m-a}+3)$$ From here, you see either n-1, n+1, or both are divisable by p (since a is nonzero.) If both were divisable, it would imply p=2, which you stated can't be true; since p is an odd prime. I hope you can carry the proof on.

 Quote by Millennial I used modular arithmetic this time, along with reductio ad absurdum.
Yes sir, I do know that you might have used modular arithmetic when you deal with divisibility. I too tried a lot reducing it. But I found out that if n mod 4 = 2 or 3 then n is not a perfect square. But I am unable to prove further.

I would be happy if you can elaborate and send me the proof.

 Quote by Millennial I used modular arithmetic this time, along with reductio ad absurdum. Here is the first thing I did. I used the properties of the expression you gave as follows: $$n^2=p^{m+a}-p^m+3p^a+1$$ $$n^2-1=(n-1)(n+1)=p^{m+a}-p^m+3p^a=p^a(p^m-p^{m-a}+3)$$ From here, you see either n-1, n+1, or both are divisable by p (since a is nonzero.) If both were divisable, it would imply p=2, which you stated can't be true; since p is an odd prime. I hope you can carry the proof on.
Yes sir, indeed a nice argument and nice proof this time. But how about proving for (n+2)^2 ? . Shall I need to use the same logic master ?
 You don't need to prove it for n+2.

 Quote by Millennial I used modular arithmetic this time, along with reductio ad absurdum. Here is the first thing I did. I used the properties of the expression you gave as follows: $$n^2=p^{m+a}-p^m+3p^a+1$$ $$n^2-1=(n-1)(n+1)=p^{m+a}-p^m+3p^a=p^a(p^m-p^{m-a}+3)$$ From here, you see either n-1, n+1, or both are divisable by p (since a is nonzero.) If both were divisable, it would imply p=2, which you stated can't be true; since p is an odd prime. I hope you can carry the proof on.
Sorry sir, a small doubt again. you said "you see either n-1, n+1, or both are divisable by p, If both were divisable, it would imply p=2". But if both are not-divisible at the same time , I mean if either n-1 or n+1 is divisible then what is the case?
 That is the part which you should answer.

 Quote by Millennial That is the part which you should answer.
Sir, I would be really happy if you can give some clue. I am not trained in modular arithmetic. I am not asking for complete proof . But only hints in that direction.

 Quote by S.Iyengar Sir, my proof has turned to be not correct. Can you give some hints in proving that ? There "a" is non-zero sir
Hi, is it me or the original statement has changed ?
I remember a and m to be non negative, and I don't remember this m=2n+a for some integer n
So anyway, when I said a=0 disproves it, I was not talking about the proof given later, it wasn't yet here anyway, I was just pointing at the fact that you were trying to prove something which is not true as stated
Do you have any context for this question ? are you being stuck in the middle of a 'bigger' proof that would rely on this to be validated ? or is this the real exercise ? can you state it exactly as it comes ?
If it is an exercise, in which context does it come ? you are often asked to apply some recently learnt theorem or rule or lemma.. that would help everyone I think.
Meanwhile, I didn't look closely at the other proof you say turned out to be wrong or incomplete, but I saw among comments that there was something about odd/even numbers, so one thing is certain, for this expression to be a square of some integer, this integer has to be even.

Cheers...

 Quote by Millennial I used modular arithmetic this time, along with reductio ad absurdum. Here is the first thing I did. I used the properties of the expression you gave as follows: $$n^2=p^{m+a}-p^m+3p^a+1$$ $$n^2-1=(n-1)(n+1)=p^{m+a}-p^m+3p^a=p^a(p^m-p^{m-a}+3)$$ From here, you see either n-1, n+1, or both are divisable by p (since a is nonzero.) If both were divisable, it would imply p=2, which you stated can't be true; since p is an odd prime. I hope you can carry the proof on.
There is another potential error here sir. p doesn't divide both the things simultaneously. It must divide the product. So assumed that n is even, as per your previous arguments ( even square would give rise to even square ) so n+1 and n-1 would be odd then. So p will be never 2 here .
 Hurray , I got it sir. Perfectly this time I have got it.. I know the complete proof for all the things now. I completed the whole proof. It does involves the even and odd manipulations. But its very easy and not complex. I just used to show that $P^a$ doesnt divide an even number in both (n+1) and (n-1) case. It turned out to be right perfectly from some series of arguments.

 Quote by Millennial That is the part which you should answer.
Sir, I have tried the following proof. Please verify whether it is right or wrong. I used t for m and $\phi$ for a for the sake of brevity.

So let us show that this fails in the case of $n^2$. Let us start with the equation $p^{t+\phi}-p^{t}+3p^{\phi}+1$. If that is a square it would be equal to some n^2 for some even $n$. $p^{t+\phi}-p^{t}+3p^{\phi}+1=n^2$. We prove that it will not happen based upon two cases. Let us simplify it further. $p^{\phi}(p^t-p^{t-\phi}+3)= n^2-1$

p^{\phi}(p^t-p^{t-\phi}+3) = (n+1)(n-1).

From the above equation its evident that $p^{\phi}$ may divide either $(n+1)$ or $(n-1)$. So there are two cases possible.
\subsubsection{ Dividing n-1 }

As we said that $p^{\phi}|(n-1)$ . From here the proof turns out to be interesting. We know that $n$ is even, hence $n-1$ would be odd. So if $p^{\phi}$ divides $(n-1)$ in $(n-1)(n+1)$ it must give rise to some new term of the form $d.(n+1)$ where $d$ is odd ( Since, odd number divided by odd number would give rise to odd number ). So that $d.(n+1) = (p^t-p^{t-\phi}+3)$ (since from (2)). So let us prove that its a contradiction.
$d.(n+1) = (p^t-p^{t-\phi}+3)$
$d.(n+1) = p^t(1-p^{-\phi})+3$
$d.(n+1)-3= p^t(1-p^{-\phi})$---(3)

So here its evident that $p^t | d.(n+1)-3$ . So the equation (3) can be written as
$M.(d.(n+1)-3)=(1-p^{-\phi})$. Where it divides $M$ times ( $M$ can be even $1$ in which the same equation is obtained ).
So its clearly evident that L.H.S is an integer. So the R.H.S is

$\frac{p^{\phi}-1}{p^{\phi}}$---(4)

So its evident that a prime number minus one is an even number. Prime numbers are nothing but in some sense odd numbers. So odd number minus one would be an even number. So the numerator in the (4) is a even number and denominator is the odd number. So it would never turn to an integer. Which is a contradiction.

 Quote by S.Iyengar Sir, I have tried the following proof. Please verify whether it is right or wrong. I used t for m and $\phi$ for a for the sake of brevity. So let us show that this fails in the case of $n^2$. Let us start with the equation $p^{t+\phi}-p^{t}+3p^{\phi}+1$. If that is a square it would be equal to some n^2 for some even $n$. $p^{t+\phi}-p^{t}+3p^{\phi}+1=n^2$. We prove that it will not happen based upon two cases. Let us simplify it further. $p^{\phi}(p^t-p^{t-\phi}+3)= n^2-1$ p^{\phi}(p^t-p^{t-\phi}+3) = (n+1)(n-1). From the above equation its evident that $p^{\phi}$ may divide either $(n+1)$ or $(n-1)$. So there are two cases possible. \subsubsection{ Dividing n-1 } As we said that $p^{\phi}|(n-1)$ . From here the proof turns out to be interesting. We know that $n$ is even, hence $n-1$ would be odd. So if $p^{\phi}$ divides $(n-1)$ in $(n-1)(n+1)$ it must give rise to some new term of the form $d.(n+1)$ where $d$ is odd ( Since, odd number divided by odd number would give rise to odd number ). So that $d.(n+1) = (p^t-p^{t-\phi}+3)$ (since from (2)). So let us prove that its a contradiction. $d.(n+1) = (p^t-p^{t-\phi}+3)$ $d.(n+1) = p^t(1-p^{-\phi})+3$ $d.(n+1)-3= p^t(1-p^{-\phi})$---(3) So here its evident that $p^t | d.(n+1)-3$ . So the equation (3) can be written as $M.(d.(n+1)-3)=(1-p^{-\phi})$. Where it divides $M$ times ( $M$ can be even $1$ in which the same equation is obtained ). So its clearly evident that L.H.S is an integer. So the R.H.S is $\frac{p^{\phi}-1}{p^{\phi}}$---(4) So its evident that a prime number minus one is an even number. Prime numbers are nothing but in some sense odd numbers. So odd number minus one would be an even number. So the numerator in the (4) is a even number and denominator is the odd number. So it would never turn to an integer. Which is a contradiction.
I have still proved many things, but I didn't end up with any contradiction sir.

Recognitions:
Homework Help
 Quote by S.Iyengar $d.(n+1)-3= p^t(1-p^{-\phi})$---(3) So here it's evident that $p^t | d.(n+1)-3$ .
No, you can't do that. $1-p^{-\phi}$ is not an integer.
 Quote by haruspex No, you can't do that. $1-p^{-\phi}$ is not an integer. E.g. 18 = 33-32 = 33(1-3-1), but 33 does not divide 18.