Do số tự nhiên n chia 7 dư 4 => n có dạng n=7k+4 (\(k\in N\)*)
Ta có: +) \(n^2=\left(7k+4\right)^2=49k^2+56k+16=\left(49k^2+56k+14\right)+2\)
\(=7\left(7k^2+8k+2\right)+2\Rightarrow n^2\) chia 7 dư 2.
+) \(n^3=\left(7k+4\right)^2=343k^3+588k^2+336k+64\)
\(=\left(343k^3+588k^2+336k+63\right)+1=7\left(49k^3+84k^2+48k+9\right)+1\)
\(\Rightarrow n^3\) chia 7 dư 1
Vậy \(n^2\) chia 7 dư 2, \(n^3\) chia 7 dư 1