# Congruence with variable modulus

I have been working on some problems and one of them has been particularly challenging. The problem is as follows.

Find a non-trivial (meaning more than 1 digit) positive integer a that satisfies:

$a/10 + 3121(a \mod 10) = 0 \mod a$

Here the division operator is meant to denote integer division so algebraically this is equivalent to:

$(\lfloor a/10\rfloor + 3121(a - 10*\lfloor a/10\rfloor)) - a*\lfloor\lfloor a/10\rfloor + 3121(a - 10*\lfloor a/10\rfloor))/a)\rfloor = 0$

I believe there should be some straightforward way to calculate this value. Using a brute force guess and check I found that $a = 101$ satisfied this congruence but I wanted to know if there was a way to analytically work this one out?

-
Is the sort of topic covered in a normal number theory book? –  frogeyedpeas Jan 14 '13 at 23:01
If so, what book should I read to learn how to solve this type of problem –  frogeyedpeas Jan 14 '13 at 23:01
Nobody? :( (*thanks Jon for the formatting) –  frogeyedpeas Jan 15 '13 at 1:12
I think your question, as it is now, is pretty confusing: what does "$\,3121(a\pmod {10})\,$" mean? . Then what you say your original expression is equivalent too is waaaay more confusing (at least for me). In fact, I've no idea what is this related to and how did this beast come into life... –  DonAntonio Jan 15 '13 at 3:25
well the 3121 is multiplied to a mod 10 –  frogeyedpeas Jan 15 '13 at 3:38

What about $\,a=3\,$? According to what you wrote, and I'm not saying I fully understand how, where, when...of it, we get:
$$\left[\frac{3}{10}\right]+3,121\cdot 3=0+3\cdot 3,121=0\pmod 3$$
And the above , of course, works the same for any positive integer $\,a<10\,$ ...
Added: If you want $\,a\,$ with more than one digit take $\,a=103\,$ :
$$\left[\frac{103}{10}\right]+3,121\cdot (103\pmod{10})=10+3\cdot 3,121=9,373=103\cdot 91$$