The number of integers \(n\) with \(1 \le n \le 100\) for which \(n^{2} \equiv 1 \pmod{8}\) is
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → 50
Let us look at even and odd values of \(n\) separately.
For an odd number \(n = 2k + 1\):
\(n^{2} = 4k^{2} + 4k + 1 = 4k(k + 1) + 1\)
One of \(k\) and \(k + 1\) is even, so \(k(k + 1)\) is even and \(4k(k + 1)\) is a multiple of 8.
\(n^{2} \equiv 1 \pmod{8}\) for every odd \(n\)
For an even number \(n = 2k\):
\(n^{2} = 4k^{2} \equiv 0 \text{ or } 4 \pmod{8}\)
So exactly the odd numbers work. From 1 to 100 there are 50 odd numbers.