Sum of Squares - Maple Help

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