help with modular arithmetic please

Hi all,

$\displaystyle n=((a^2+b^2)(c^2+d^2)(f^2+2ef-e^2))^2+((a^2+b^2)(d^2+2cd-d^2)(e^2+f^2))^2+(b^2+2ab-a^2)(c^2+d^2)(e^2+f^2))^2$

It is known that

$\displaystyle a^2+b^2\equiv 1\ mod\ 4$

$\displaystyle c^2+d^2\equiv 1\ mod\ 4$

$\displaystyle e^2+f^2\equiv 1\ mod\ 4$

from these we can say that if

$\displaystyle a\equiv(0\ mod\ 4)\ or\ (2\ mod\ 4)\ then\ b\equiv\ (1\ mod\ 4)\ or\ (3\ mod\ 4)$ or vice versa.

The same is true for the relationship between (c and d) and (e and f)

I have found that $\displaystyle n\equiv\ 3\ mod\ 4$ by using permutations of the above.

From reasonably extensive computer modelling of n, it also appears that $\displaystyle n\equiv0\ mod\ 3$ but I can't seem to relate that to the above. Is it obvious why and I'm just suffering brain-freeze?

Thanks for helping thaw me out :)

Re: help with modular arithmetic please

Its pretty late, and I haven't really thought it all the way through but since 12 is the lcm of 3 and 4. Maybe you could convert the entire thing to mod 12.

$\displaystyle a^2+b^2\equiv\ 1,5,9\ mod\ 12$

$\displaystyle c^2+d^2\equiv\ 1,5,9\ mod\ 12$

$\displaystyle e^2+f^2\equiv\ 1,5,9\ mod\ 12$

Then build a relation table for a and b mod 12. Using a computer program you might be able to handle all the permutations, to find out what possible values n can hold mod 12. Of course you are expecting to see:

$\displaystyle n\equiv\ 0,3,6,9\ mod\ 12$

which then proves that:

$\displaystyle n\equiv\ 0\ mod\ 3$

Re: help with modular arithmetic please

Thanks takatok, I can do that. I was just hoping for something more elegant.