\(n^3+\left(n+1\right)^3+\left(n+2\right)^3\)
\(=\left(n+n+2\right)\left[n^2-n\left(n+2\right)+\left(n+2\right)^2\right]+\left(n+1\right)^3\)
\(=2\cdot\left(n+1\right)\left[n^2-n^2-2n+n^2+4n+4\right]+\left(n+1\right)^3\)
\(=\left(n+1\right)\left[2\left(n^2+2n+4\right)+n^2+2n+1\right]\)
\(=\left(n+1\right)\left(2n^2+4n+8+n^2+2n+1\right)\)
\(=\left(n+1\right)\left(3n^2+6n+9\right)\)
\(=3\left(n+1\right)\left(n^2+2n+3\right)\)\(=3n\left(n+1\right)\left(n+2\right)+9\left(n+1\right)\)
n;n+1;n+2 là 3 số liên tiếp nên \(n\left(n+1\right)\left(n+2\right)⋮3!=6\)
=>\(3n\left(n+1\right)\left(n+2\right)⋮3\cdot6=18\)
=>\(3n\left(n+1\right)\left(n+2\right)⋮9\)
mà 9(n+1) chia hết cho 9
nên \(3n\left(n+1\right)\left(n+2\right)+9\left(n+1\right)⋮9\)
=>\(n^3+\left(n+1\right)^3+\left(n+2\right)^3⋮9\)