Maths WorkshopMaths problems with full solutions
Exercise 368Number theory › Divisibility and gcdHigh schoolAdded 2 Nov 2026

$n^2-1$ is divisible by 8 for odd $n$

#divisibility#parity#consecutive integers

Statement

Show that if nn is an odd integer, then 8∣n2−18\mid n^2-1.

Hint

Factor n2−1=(n−1)(n+1)n^2-1=(n-1)(n+1) and observe that n−1n-1 and n+1n+1 are consecutive even integers.

Show solutionHide solution

Solution

Factorization. n2−1=(n−1)(n+1)n^2-1=(n-1)(n+1).

Parity argument. Since nn is odd, both n−1n-1 and n+1n+1 are even. They are consecutive even integers, so one of them is divisible by 22 and the other by 44. Hence their product is divisible by 88.

More formally, there exists kk such that {n−1,n+1}={2k,2k+2}=2{k,k+1}\{n-1,n+1\}=\{2k,2k+2\}=2\{k,k+1\}. Among kk and k+1k+1, one is even, so 4∣(n−1)(n+1)4\mid (n-1)(n+1). Together with the factor 22 from each, we get 8∣n2−18\mid n^2-1.

Remark. This is a classical parity result.