How many triangles are there whose vertices are the vertices of the small cubes in a Rubik's cube? There are 4x4x4= 64 vertices, and I'm not sure where to go after this. Do you do 64 choose 3?
 A: Imagine looking at the 4x4x4 grid from above:
$$\begin{array}{cccc}.&.&.&.\\.&.&.&.\\.&.&.&.\\.&.&.&.\\\end{array}$$
Each dot represents a column of four points. Now we begin counting degenerate triangles which use three distinct points in the 4x4x4 grid.
Vertical lines. There are 16 vertical lines, one for each column (dot) in the diagram, each providing $4 \choose 3$ such degenerate triangles.
Other lines through 4 points. Viewed from above, there are 10 lines which pass through four columns. For any such line, we can choose three columns and then decide how high each point is.


*

*If the degenerate triangle uses both the first and last columns in the line, there are 2 choices for the inner column, then 6 ways to position the points vertically (4 of them horizontal, 2 at a 45° slant).

*Otherwise, there are 2 choices for the omitted column, then 8 ways to position the points vertically (4 of them horizontal, 4 at a 45° slant).


Lines through 3 points. Viewed from above, there are 4 lines which pass through three columns. Then there are 8 ways to position the points vertically.
Summing, there are $16\cdot 4+10(2\cdot 6+2\cdot 8)+4\cdot 8=376$ degenerate triangles using three distinct points.
Thus there are ${64\choose 3}-376=41288$ non-degenerate triangles.
