NumberTheory
SumOfSquares
solutions to the sum of two squares problem
Calling Sequence
Parameters
Description
Examples
Compatibility
SumOfSquares(n)
n
-
integer
The SumOfSquares function computes the solutions to the sum of two squares problem.
The return value is a set s of two-element lists of non-negative integers such that x,y is in s if and only if x≤y and x2+y2=n.
with⁡NumberTheory:
SumOfSquares⁡17
1,4
SumOfSquares⁡938491
∅
s ≔ SumOfSquares⁡10281960
s≔234,3198,1014,3042,1422,2874,1446,2862,2106,2418
map⁡ss→ss12+ss22,s
10281960
The NumberTheory[SumOfSquares] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
See Also
Download Help Document
What kind of issue would you like to report? (Optional)