Sum of Squares - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


NumberTheory

  

SumOfSquares

  

solutions to the sum of two squares problem

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

SumOfSquares(n)

Parameters

n

-

integer

Description

• 

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 xy and x2+y2=n.

Examples

withNumberTheory:

SumOfSquares17

1,4

(1)

SumOfSquares938491

(2)

sSumOfSquares10281960

s234,3198,1014,3042,1422,2874,1446,2862,2106,2418

(3)

mapssss12+ss22,s

10281960

(4)

Compatibility

• 

The NumberTheory[SumOfSquares] command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

NumberTheory