SquaresR[d,n] gives the number of ways to represent the integer n as a sum of d squares.
Number of ways to represent 45 as a sum of two squares:
The number of integer points on a circle of radius :
Base 2 logarithm of the number of integer points on a sphere of dimension n:
PowersRepresentations EllipticTheta Reduce