Find, with proof, all positive integers $N$ for which the sphere centered at the origin of radius $N$ has an inscribed regular tetrahedron whose vertices have integral coordinates.
Clearly if $N=3m^2$ there is such a tetrahedron; consider the vertices $(m,m,m), (m,-m,-m), (-m,-m,m), (-m,m,-m)$. Now suppose $Q_i = (x_i,y_i,z_i)$ for $1\leq i\leq 4$ are the vertices of an inscribed regular tetrahedron.
Here I'm supposing the centroid is the intersection of the line segments from vertices to the centroid of the opposite face (analogous to the centroid of a triangle being the intersection of the medians).
Why must it be the case that the center of the tetrahedron equals the center of the sphere? I think one way to prove this is to use vectors and prove that the vector sum of the 4 vectors with one endpoint at the origin and the other at a vertex of the tetrahedron is the zero vector.
In particular, I'm not sure why for a tetrahedron with vertices $A,B,C,D$, we have that the coordinates of the centroid/center is $\frac{A+B+C+D}4$. I can show that the point $O = \frac{A+B+C+D}4$ divides the line segments joining vertices to the centroid of the opposite face in the ratio $3:1$, but how does that show that $O$ is the centroid of the tetrahedron?
Why is it the case that the four vertices $Q_i$ along with the four vertices $R_i = (-x_i, -y_i, -z_i)$ form the vertices of an inscribed cube in the sphere?
I know the side length of the cube is $2(\frac{N}3)^{1/2}$ and so its volume is $8(N/3)^{3/2}$.
Why is this volume an integer? If so, that'll suffice to prove that $N = 3m^2$ for some integer $m$ because then $(N/3)^3$ would have to be a perfect square, which implies $N/3$ is a perfect square.