5.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.
-
pa2b2 takes one argument:
p, a prime number which is congruent to 1 modulo 4.
- pa2b2(p) returns a list of integers [a,b],
where p= a2+b2.
Example
Input:
pa2b2(17)
Output:
indeed, 17=42+12.