PRODUCTS
Mathematica
Mathematica Home Edition
Mathematica for Students
Mathematica for the Classroom
grid
Mathematica
Wolfram Lightweight Grid Manager
web
Mathematica
Mathematica Player
(free download)
Mathematica Player Pro
Wolfram
Workbench
Mathematica
Applications
SOLUTIONS
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics, & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts, & Entertainment
Game Design, Special Effects, & Generative Art
Education
Higher Education
Precollege Education
Students
Technology
Interactive Deployment
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
FOR USERS
All User Resources
Product Registration
Technical Support
Customer Service
Developer Support
Does My Site Have a License?
Free Seminars
Learning Center
Training
Custom Group Seminars
Documentation & Examples
Tutorial Screencasts
Video Gallery
Demonstrations Project
Education Portal
Student Resources
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
Wolfram|Alpha
Demonstrations Project
Wolfram Blog
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Library Archive
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
Mathematica
>
Mathematics and Algorithms
>
Mathematical Functions
>
Number Theoretic Functions
>
Built-in
Mathematica
Symbol
Integer and Number Theoretic Functions
Tutorials »
|
PowersRepresentations
EllipticTheta
Reduce
See Also »
|
Additive Number Theory
Diophantine Equations
Mathematical Functions
Number Theoretic Functions
Number Theory
New in 6.0: Mathematical Functions
New in 6.0: Number Theory & Integer Functions
More About »
SquaresR
SquaresR
[
d
,
n
]
gives the number of ways
to represent the integer
n
as a sum of
d
squares.
MORE INFORMATION
gives the number of ways to write
, where the
n
i
can be positive, negative or zero.
EXAMPLES
CLOSE ALL
Basic Examples
(3)
Number of ways to represent 45 as a sum of two squares:
In[1]:=
Out[1]=
The number of integer points on a circle of radius
:
In[1]:=
Out[1]=
Base 2 logarithm of the number of integer points on a sphere of dimension
n
:
In[1]:=
Out[1]=
Applications
(2)
Properties & Relations
(2)
SEE ALSO
PowersRepresentations
EllipticTheta
Reduce
TUTORIALS
Integer and Number Theoretic Functions
MORE ABOUT
Additive Number Theory
Diophantine Equations
Mathematical Functions
Number Theoretic Functions
Number Theory
New in 6.0: Mathematical Functions
New in 6.0: Number Theory & Integer Functions
New in 6