Possible Duplicate:
Integer coordinate set of points that is a member of sphere surface

Assume $C$ is a sphere with radius $r$ and center in the origin (0,0,0). How can we find the set of all points with integer coordinates that lie on the surface of $C$?


marked as duplicate by Gerry Myerson, Will Jagy, sdcvvc, William, J. M. is a poor mathematician Sep 3 '12 at 23:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Related: en.wikipedia.org/wiki/Gauss_circle_problem $\endgroup$ – Bill Cook Sep 2 '12 at 20:16
  • $\begingroup$ @BillCook That gives points inside a circle, I require points on a surface. $\endgroup$ – Khaled Sep 2 '12 at 20:29
  • 2
    $\begingroup$ Related: math.stackexchange.com/questions/76892/pythagorean-quadruples $\endgroup$ – user940 Sep 2 '12 at 20:34
  • 1
    $\begingroup$ @Lubin: if it's not the square root of an integer, the answer is easy. $\endgroup$ – Robert Israel Sep 2 '12 at 20:44
  • 1
    $\begingroup$ "I would also kindly request you stop accusing me of posting PE problems on every question I post." Khaled, you have posted 12 questions. On 10 of them I have made no mention whatever of Project Euler. Please refrain from telling lies about my activity here. $\endgroup$ – Gerry Myerson Sep 3 '12 at 13:04