Just by plugging in numbers, I know that there are 4 solutions: X = 1, 3, 5 and 7. I'm not sure if I need to show additional steps or if I can just write my answer as it is.
Asked
Active
Viewed 216 times
1
-
1That's fine, there are only $8$ options and checking them is very fast. You can save a bit of time by observing that $x$ has to be odd so there are only $4$ options to check. – Qiaochu Yuan Oct 12 '20 at 02:34
-
1I believe a more formal proof is warranted. See my answer. – KingLogic Oct 12 '20 at 02:38
-
Got it, thank you! – Oct 12 '20 at 02:52
2 Answers
1
What you have done is correct.
For a more formal proof:
Let an odd positive integer $n$ be written as $n=2k+1$, where $k$ is any non-negative integer.
We know that $n^2=4k^2+4k+1=4k(k+1)+1$
For any two consecutive integers, one (and only one) must be even (the other one is odd), so $4k(k+1)$ is divisible by $8$.
So $n^2-1$ is divisible by $8$.
However, if $n$ is an even positive integer, then $n=2k$, and $n^2=4k^2$, and so $n^2\equiv0, 4 (\mod 8)$, so $n^2-1\equiv 3, 7 (\mod 8)$.

KingLogic
- 1,441
-
1This is a stronger result than what the OP asks for, which is only to understand the solutions in $[0, 8)$. – Qiaochu Yuan Oct 12 '20 at 02:48
-
1@QiaochuYuan I know. But I cannot just say "What you have done is correct" and just leave it as that. I think this might be helpful to the OP or maybe to others who view the question. – KingLogic Oct 12 '20 at 02:49
-
0
A powerful trick, often used in number theory, is that $\bmod n$, there are only $n$ numbers (to check).