Previous Up Next

6.5.22 Solving a2+b2=p in ℤ: pa2b2

Any prime number congruent to 1 modulo 4 can be written as a sum of two squares. The pa2b2 command finds such a decomposition.


Example.
Input:

pa2b2(17)

Output:


4,1

indeed, 17=42+12.


Previous Up Next