How to show that $\dfrac{n^3 + 2n}{3}$ is an integer Show that for each natural number $n, \dfrac{n^3 + 2n}{3}$ is an integer
My try:
Let P(n) be the statement that $n^3 + 2n$ is divisible by $3$.
Base step:
When $n = 0$ we have $0^3 + 0 = 0 = 3 \times 0$
So, the base case true.
Inductive hypothesis:
Assume that $P(k)$ is true.
which means $\dfrac{k^3 + 2k}{3}$ is divisible by $3$ and $\dfrac{k^3 + 2k}{3}=p$ for some integer $p$.
Now we need to show that $P(k+1)$ is true.
$(k+1)^3+2(k+1)$ and we will show that this divisible by $3$.
Proof:
$(k+1)^3+2(k1)=k^3+3k^2+3k+1+2k+2$
$.$
$.$
$.$
$.$
$=3(p+k^2+k+1)$
As $p+k^2+k+1$ is an integer we have that $(k+1)^3+2(k+!)$ is divisible by $3$.
Is my above attempt correct?
Did I show that for each natural number $n, \dfrac{n^3 + 2n}{3}$ is an integer?

Or you could directly let $P'(n)$ be the proposition that "$\frac{n^3+2n}{3}$ is an integer".
Assume $P'(k)$ is true for some $k \in \mathbb N$, then consider $P'(k+1)$,
$$\begin{align*}
\frac{(k+1)^3+2(k+1)}{3} &= \frac{k^3+3k^2+3k+1 + 2k + 2}3\\
&= \frac{k^3+2k}3 + k^2+k+1\\
&\in \mathbb Z
\end{align*}$$
