Previous Up Next

5.6.25  Solving a2+b2=p in ℤ: pa2b2

pa2b2 decompose a prime integer p congruent to 1 modulo 4, as a sum of squares: p= a2+b2. The result is the list [a,b].
Input:

pa2b2(17)

Output:

[4,1]

indeed 17=42+12


Previous Up Next