1

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.

gt6989b
  • 54,422

2 Answers2

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
  • 1
    This 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
  • Thank you both! –  Oct 12 '20 at 02:51
0

A powerful trick, often used in number theory, is that $\bmod n$, there are only $n$ numbers (to check).