Elegant Roots 2

a , b a,b are positive integers with a > b a>b such that a 2 + b 2 = 2009 . {a^{2}+b^{2}=2009}. What is the sum of all possible values of a a ?


Inspired by: @satyen nabar, Elegant Roots


The answer is 35.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Kalyan Na
Oct 22, 2016

since 2009 is 49*4. I used modulo 7 to arrive at: a^2 + b^2 = 0(mod7) if a or b is non zero then dividing by it makes the eq: 1 + u^2 = 0 (mod 7)

Such a square doesn't exist. ( just square 1 to 6 and check the non of them are -1 mod 7).

which implies both a and b are divisible by 7. Setting a=7x and b= 7y, we can reduce the equation to x^2 + y ^2 = 41.

Doing mod 4 shows that one is even and the other is odd.

Checking even numbers 0,2,4,6 = we find only one solution 16 + 25 =41

i.e x=5 and a = 35

Good approach

Daksh A Agarwal - 4 years, 7 months ago

any way to do this without mod?

John Smith - 4 years, 6 months ago

Log in to reply

We know a is between 32 and 44, so there aren't too many values to check.

Joe Mansley - 1 month, 2 weeks ago

We can write a²+b²=35²+28² then can we assume 'a' as 35 or 28???

Sanjay Prasad - 4 years, 3 months ago
Daksh A Agarwal
Oct 21, 2016

Note that since a > b, it follows that 2 a 2 2a^2 > a 2 + b 2 a^2 + b^2 > 2009. This yields a 2 a^2 > 1004 and so 45 > a > 31(For if a > 45 then a 2 > 2025 a^2 > 2025 . Also looking at the equation modulo 5, a 2 + b 2 2009 4 ( m o d 5 ) a^2 + b^2 \equiv 2009 \equiv 4 (mod \: 5) . Now since a 2 0 , 1 o r 4 ( m o d 5 ) a n d b 2 0 , 1 o r 4 ( m o d 5 ) a^2 \equiv 0,1 \: or \: 4 (mod \: 5)\: and \: b^2 \equiv 0,1 \: or \: 4 (mod \: 5) , it implies that a 0 o r 4 a \equiv 0 \: or \: 4 . Now also looking at the equation modulo 3, we get a 2 + b 2 2 ( m o d 3 ) a^2 + b^2 \equiv 2 \: (mod \: 3) . Therefore, a 2 1 ( m o d 3 ) a^2 \equiv 1 (mod \: 3) and a 1 o r 2 ( m o d 3 ) a \equiv 1 \: or \: 2 (mod \: 3) . Hence in the interval (31 : 45), the possible values for a are 34,35,40,44. Of these four values the only value which satisfies the given equation is a = 35. \square

Darnesh Narla
Jun 15, 2014

Start by looking at the units place. For it to be 9, the units place of a^2 and b^2 have to end in either (0,9) or (4,5). For this 'a' and 'b' have to end in either { 0, (3,7) } or { (2,8), 5 }. So if you just sort out the numbers below 45 ( 45^2=2025 ), you find that only (28,35) is the possible solution. As a>b, a=35.

Another approach is to notice that 2009 = 7 2 × 41 2009 = 7^2 \times 41 . Since 7 3 ( m o d 4 ) 7 \equiv 3 \pmod{4} and 41 1 ( m o d 4 ) 41 \equiv 1 \pmod{4} , hence there is only 1 way (up to permutation) to express it as the sum of 2 squares.

Calvin Lin Staff - 6 years, 12 months ago

Code

1
2
3
4
5
for a in range(1,2009):
    for b in range(0,2009):
        if (a**2+b**2==2009):
            if (a>b):
                print(a,b)

Output

1
35 28

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...