Each cube number k³ is exactly the L-shaped border that grows a square from side 1+2+…+(k−1) to side 1+2+…+k. So stacking the cubes always rebuilds a perfect square — and its side is a triangular number. Add them one at a time.