## 11564 - Just A Few More Triangles!

Moderator: Board moderators

Sedefcho
A great helper
Posts: 374
Joined: Sun Jan 16, 2005 10:18 pm
Location: Bulgaria

### 11564 - Just A Few More Triangles!

Is there something wrong with this problem?

1) Only 13 submissions were made for it
2) Only 2 out of 8 people solved it
3) Also, I cannot yet find out why the answer for 7 is 16.

For this simple case (mod 7) I count like this.
residues x -> 1,2,3,4,5,6
respective x^2 (mod 7) -> 1,4,2,2,4,1

So all possible x^2 + y^2 are 1(=4+4),2(=1+1),3(=1+2),4(=2+2),5(=1+4),6(=2+4),
so basically all residues mod 7 are sums of the form x^2 + y^2.

But the sums 3,5 and 6 are not
square residues mod 7 (i.e. they cannot
be represented as c^2 mod 7 for any c).

So all possible solutions
(these below are x^2 residues)
seems to me are
1 + 1 = 2 (mod 7)
2 + 2 = 4 (mod 7)
4 + 4 = 1 (mod 7)

following 6 equalities (mod 7).

a=1, b=6 and c=3 or 4
1^2 + 6^2 = 3^2
1^2 + 6^2 = 4^2

a=3, b=4 and c=2 or 5
3^2 + 4^2 = 2^2
3^2 + 4^2 = 5^2

a=2, b=5 and c=1 or 6
2^2 + 5^2 = 1^2
2^2 + 5^2 = 6^2

So all in all I think we have 6 solutions.
Have no idea where the other 12 can come from
(especially as we have the restriction a<=b).
we will have 12 solutions, I think.

Am I missing something obvious here?
Last edited by Sedefcho on Mon Feb 23, 2009 2:43 pm, edited 1 time in total.

SerailHydra
New poster
Posts: 20
Joined: Mon Oct 20, 2008 6:26 am

### Re: 11564 - Just A Few More Triangles!

These are all the 18 solutions for N = 7:
1 1 3
1 1 4
1 6 3
1 6 4
2 2 1
2 2 6
2 5 1
2 5 6
3 3 2
3 3 5
3 4 2
3 4 5
4 4 2
4 4 5
5 5 1
5 5 6
6 6 3
6 6 4
Good luck

Sedefcho
A great helper
Posts: 374
Joined: Sun Jan 16, 2005 10:18 pm
Location: Bulgaria

### Re: 11564 - Just A Few More Triangles!

Oh, okay, thank you. I am going to check them.

Seems I was rather distracted when writing my
previous note on this problem . For example
apparently I assumed that a<b and not a<=b
(don't know why).