SquaresR

SquaresR[d,n]
gives the number of ways to represent the integer n as a sum of d squares.

DetailsDetails

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

ExamplesExamplesopen allclose all

Basic Examples  (3)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]=
Introduced in 2007
(6.0)