Do there exist uniform triangular prisms with all vertices in $\mathbb Z^3$?

Suppose that there exists a triangular prism in $\mathbb{Z}^3$ of side length $s$. From a given vertex $V$, let $a$ and $b$ be the vectors on the triangular face containing $V$ and $c$ the vector from $V$ to its pair on the other triangular face. Note that $a,b$, and $c$ are all of length $s$.

enter image description here

Now, consider the integer vector $a\times b$; since $a$ and $b$ are $60^\circ$ apart, it has length $s^2\cdot\frac{\sqrt{3}}2$. Up to a change of sign, this vector is parallel to $c$, so $c$ is a rational multiple of $a\times b$ (since both lie in $\mathbb{Z}^3$). Thus, $s$ and $\frac{s^2\sqrt{3}}2$ differ by a rational factor, so we conclude that $s$ is a rational multiple of $\sqrt{3}$.

This means that we can scale the prism so that its side length is an integer multiple of $\sqrt{3}$. Then scale it by a further factor of $2$, so that the midpoints of each edge also have integer coordinates. Let $k\sqrt{3}$ be the integer distance from a vertex to a midpoint of an edge.

But now consider the integer vector from the midpoint of a non-triangle edge to a non-adjacent vertex: it has length $(k\sqrt{3})\cdot \sqrt{5}$.

So, the squared distance $15k^2$ between these two integer points is the sum of three squares. Note that $k^2$ is of the form $4^n(8a+1)$, so $15k^2$ is of the form $4^n(8b+7)$. But, by Legendre's three-square theorem, such integers are not expressible as the sum of three squares! So no such prism exists.


There do exist triangular prisms in $\mathbb{Z}^5$: Take the first three coordinates to be any permutation of $(0,0,1)$, and the last two to be either $(0,0)$ or $(1,1)$. This gives a triangular prism of side length $\sqrt{2}$.

I'm not sure yet about $\mathbb{Z}^4$ - my guess is no, but checking some small examples seems worthwhile.