Chinese reminder theorem - evaluating inverses

76 Views Asked by At

So, this is the CRT scheme I know:

$$x=b_{1}*N_{1}*a_{1} + b_{2}*N_{2}*a_{2} + ...$$

Where $a_{x}$ is:

$N_{x}a_{x} \equiv 1 (mod $ $n_{x})$


All right, so let's assume I have the following system of congruences:

$$\begin{align} \begin{split} x &\equiv 3 \mod{10}\\ x &\equiv 4 \mod{7}\\ x &\equiv 2 \mod{9}. \end{split} \end{align}$$

$N_{1}=63$ $N_{2}=90$ $N_{3}=70$


My question is - if I get $10k-3$ as an inverse solution to the first congruence here...what should I substitute for k?

The website I got this example from substituted $k=1$, so $a_{1}=7$
The second inverse is $7k-1$, the website substituted $k=0$ this time, so $a_{2}=-1$

etc... I tried to substitute some random values, but it doesn't work.