Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Mathematical Functions > Number Theoretic Functions >

SquaresR

SquaresR[d, n]
gives the number of ways r_d(n) to represent the integer n as a sum of d squares.
  • r_d(n) gives the number of ways to write , where the ni can be positive, negative or zero.
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:
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]=
Number of lattice points inside the circle of radius 20 with center at the origin:
Approximation of the Sierpinski constant:
The number of representations as the sum of two squares:
PowersRepresentations enumerates the ordered representations up to units:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team