SquaresR

SquaresR[d,n]

gives the number of ways to represent the integer n as a sum of d squares.

Details

  • gives the number of ways to write , where the ni can be positive, negative, or zero.

Examples

open allclose all

Basic Examples  (3)

Number of ways to represent 45 as a sum of two squares:

In[1]:=
Click for copyable input
Out[1]=

The number of integer points on a circle of radius :

In[1]:=
Click for copyable input
Out[1]=

Base 2 logarithm of the number of integer points on a sphere of dimension n:

In[1]:=
Click for copyable input
Out[1]=

Applications  (2)

Properties & Relations  (4)

See Also

PowersRepresentations  EllipticTheta  Reduce

Tutorials

Introduced in 2007
(6.0)