A lattice point is a point in space which has all coordinates as integers. How many $3D$ lattice points are exactly $7$ units from the origin?
I'm thinking the answer to this is $3$, since we have only $(7, 0, 0), (0, 7, 0)$, and $(0, 0, 7)$. Is this correct? Feels too simple, so I think I might be missing something.
The integral point $(x,y,z)$ has Euclidean distance $7$ from $(0,0,0)$ if and only if $$ x^2+y^2+z^2=7^2. $$ For $x=1$, the equation $y^2+z^2=48$ has no integer solution, and also for $x=5$ there is no solution. This follows from Fermat's theorem about the sum of two squares. For $x=0,2,3,6,7$ there are solutions. An example is $(x,y,z)=(2,3,6)$. This yields eight different possibilities $(\pm 2,\pm 3,\pm 6)$. It is easy to list all solutions now. The total number is $54$, see OEIS, which counts the number of different integral solution of $$ x^2+y^2+z^2=n^2 $$ for $n\ge 1$.