3

Is there any way (except trying for $t=0,1,2,\ldots,a-1)$ to solve the following equation for $t$ when $a$ and $b$ are known?

$$ at +b = 0 \pmod{(a-t)} \text{ with } a,b,t \in N $$

vauge
  • 323

2 Answers2

3

$at +b = 0 \mod\ (a-t)$ then $at+b=-a^2+at \mod\ (a-t)$ we have $$b+a^2=0 \mod\ (a-t)$$ and $$b+a^2=k(t-a)$$ $$t=\frac{b}{k}+\frac{a^2}{k}+a: k\in \mathbb Zk|b ,k|a^2$$

M.H
  • 11,498
  • 3
  • 30
  • 66
0

$$a*t +b = 0 \mod (a-t) \Leftrightarrow at +b = k(a-t)$$ for some integer $k$.

This is equivalent to

$$at+kt=ka-b \Leftrightarrow t=\frac{ka-b}{a+k}=a-\frac{a^2+b}{a+k}$$

This is an integer if and only if $a+k$ is a divisor of $a^2+b$.

Thus,

Step 1: List all the integer divisors of $a^2+b$.

Step 2: For each divisor $d$ set $k=d-a$ and then $t=a-\frac{a^2+b}{d}$. Keep only the positive solutions.

N. S.
  • 132,525