Proof that $n$ planes cut a solid torus into a maximum of $\frac16(n^3+3n^2+8n)$ pieces
Solution 1:
Here's the intuitive explanation, which can be made rigorous: The maximum number of pieces is not going to change if you change the relative size of the donut and the hole, or if you stretch the donut in one direction. So you can think of a fat, sort of cigar-shaped, donut with a very skinny long hole in it. In fact, taking this equivalence to its logical extreme, you'll get the same number of pieces if your donut is just a cake with a slit cut through the middle of it (the slit does not touch any side of the cake, so from above it looks like $\Theta$ -- notice how the crossbar does not actually touch the outer circle).
Now, instead of starting with a slitted cake, we can think of cutting a cake with $n$ planar cuts, and then cutting the slit. But the slit is just like an $(n+1)$st planar cut, except that because it doesn't reach the edges of the cake, there must be (at least) two pieces of cake that it doesn't manage to separate. Therefore, the maximum slitted cake/torus number of pieces with $n$ cuts is just the maximum number of pieces you can cut a cake into with $n+1$ cuts, minus two. But the cake numbers $C(n)$ are already well known; see https://oeis.org/A000125 for a proof that $C(n) = (n^3+5n+6)/6$.
Finally, substituting gives us the torus formula $f(n) = C(n+1) - 2 = ((n+1)^3+5(n+1)+6-12)/6 = (n^3+3n^2+8n)/6$, as expected.