I wish to know if $\equiv 1 \text{ (mod) }8$ is a necessary and sufficient condition for an odd square number? If not, does there exist a necessary and sufficient criterion for a number to be an odd square? For example $ 14144 x^2+3872 x +265 $ has a congruence of $ 1 \text{ (mod) }8$ for all $x$ but is never a square. So, I am a bit confused as to whether I am understanding something wrong.
Asked
Active
Viewed 121 times
0
-
I'm a bit confused as to what you're asking. A necessary and sufficient condition for an odd square number to be what? – jgon May 29 '19 at 19:24
-
Thanks.. Edited the question to be clear. – Wilbur May 29 '19 at 19:25
-
2Is there some reason you think this is a necessary and sufficient condition? (consider the number 17, for example) – xxxxxxxxx May 29 '19 at 19:26
-
Perhaps think about how numbers which satisfy your congruence grow, as well as how odd perfect squares grow. – jgon May 29 '19 at 19:27
-
I do not know.. That is why I asked a question... I know that all odd squares are 1 (mod) 8, so I was wondering if there exists a necessary and sufficient condition in terms of congruences. – Wilbur May 29 '19 at 19:28
-
On triangular numbers (see my answer) - there is a neat dissection of an odd square into $8$ equal triangles plus the central square which works as a "proof without words". – Mark Bennet May 29 '19 at 19:37
-
In the $2$-adic integers $\Bbb Z_2$, an element is an odd square iff it is congruent to $1$ modulo $8$. – Angina Seng May 29 '19 at 19:48
1 Answers
2
All odd squares are $\equiv 1 \bmod 8$ because $$(2m+1)^2=8\cdot \frac {m(m+1)}2+1$$
So the condition is necessary.
$17\equiv 1 \bmod 8$, but $17$ is not an integer square. So the condition is not sufficient.
A sufficient condition would be that $n$ was $8$ times a triangular number plus one.
Note: it is easy to observe that the difference between two successive squares is greater than $8$ provided the larger is at least $25$. The difference between two successive squares grows without limit, so no arithmetic progression will work to give a sufficient condition.
The triangle number condition is quadratic (and therefore goes with squares), but is so easy that it adds very little useful information.

Mark Bennet
- 100,194
-
Thanks a lot. That helped. So my follow up question is can $14144x2+3872x+265$ be proved to be a non-square for any value of $x$ by modular arithmetic? Or for that matter any $ax^2+bx+c$? – Wilbur May 29 '19 at 19:52
-
@WilburWestwood Can I suggest asking that as a separate question (link this one to it) - questions are best asked as questions rather than comments. There are various techniques which might be applied. – Mark Bennet May 29 '19 at 19:56
-
Sure, I opened a new question: (https://math.stackexchange.com/questions/3244576/condition-on-a-quadratic-equation-to-be-an-odd-perfect-square-using-modular-arit) Thanks a lot for the guidance! – Wilbur May 29 '19 at 20:07