I came across a problem like this (not homework)(adsbygoogle = window.adsbygoogle || []).push({});

[tex] x^2+y^2-k[/tex]

For example,

[tex] x^2+y^2-24 \text{ ,n=4}[/tex]

[tex] x^2+y^2-45 \text{ ,n=8}[/tex]

If x and y are any positive integers (not given) and k is a positive integer (given), is this expression divisible by n (a positive integer that is given). A friend told me that you could use modular arithmetic to solve this. Having never learned modular arithmetic, I don't if that is true. Is it? And if yes, can someone please point me to some online resources where I can learn it? Thanks.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Can you use modular arithmetic to solve this?

**Physics Forums | Science Articles, Homework Help, Discussion**