# Homework Help: Find integers A and B such that A^2 +B^2 = 8585

1. Jan 22, 2013

### ptolema

1. The problem statement, all variables and given/known data

Find integers A and B such that A2 +B2 = 8585

2. Relevant equations

3. The attempt at a solution
Sum of 2 squares: 8585 = 67^2 + 64^2 = 76^2 + 53^2 = 88^2 + 29^2 = 92^2 + 11^2.
I started off looking at the graph of the circle A2 +B2 = 8585. My problem was trying to limit my possible solutions to integers.
Is there is any kind of method/algorithm for expressing a number as a sum of squares? I haven't really seen it as commonly as I do the difference of squares.

2. Jan 22, 2013

### haruspex

The set of numbers which are the sum of two squares is closed under multiplication. (This can easily be seen by considering the moduli of complex integers.) So a good place to start is to factorise the target. If all its factors are sums of two squares, then solve those individually. Can you figure out from my hint how to recombine them?

3. Jan 22, 2013

### Joffan

Check here if you need more inspiration.

4. Jan 22, 2013

### ptolema

I see now. So 5, 17, and 101 are the factors of 8585. 5=2^2 + 1^2, 17=4^2 + 1^2, and 101=10^2 + 1^2. Using the Brahmagupta-Fibonacci identity yields the results shown.