numtheory(deprecated)/sum2sqr - Maple Help

numtheory(deprecated)

 sum2sqr
 the sum of two squares problem

 Calling Sequence sum2sqr(n)

Parameters

 n - integer

Description

 • Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[SumOfSquares] instead.
 • The sum2sqr returns the solutions of the sum of two squares problem.
 • The result is returned as in the form $[[{a}_{1},{b}_{1}],[{a}_{2},{b}_{2}],\mathrm{...},[{a}_{n},{b}_{n}]$ where ${a}_{i}$, ${b}_{i}$ are non-negative integers, ${a}_{i}^{2}+{b}_{i}^{2}=n$, and ${a}_{i}<={b}_{i},1<=i<=n$.
 • The command with(numtheory,sum2sqr) allows the use of the abbreviated form of this command.

Examples

Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[SumOfSquares] instead.

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $\mathrm{sum2sqr}\left(17\right)$
 $\left[\left[{1}{,}{4}\right]\right]$ (1)
 > $\mathrm{sum2sqr}\left(938491\right)$
 $\left[\right]$ (2)
 > $\mathrm{sum2sqr}\left(10281960\right)$
 $\left[\left[{234}{,}{3198}\right]{,}\left[{1014}{,}{3042}\right]{,}\left[{1422}{,}{2874}\right]{,}\left[{1446}{,}{2862}\right]{,}\left[{2106}{,}{2418}\right]\right]$ (3)