Finding the number of integer points inside a sphere of radius R and dimension D centered at the Origin

400 Views Asked by At

I am writing a computer program to count the number of integer points inside a sphere of radius R and Dimension D centered at the origin. In essence, if we have a sphere of dimension 2 (circle) and radius 5, I am determining all integer solutions to the inequality $X^{2} + Y^{2} \leq 25 $. Instead of counting every possible integer point, is there an efficient way to count the points ? Using symmetry ?