Problem :
Find the natural number $pq57r$ , is written in the decimal system , is divisible by $729$ then find $p,q,r$
My attempt as following :
$\bar {pq57r}\equiv 0\pmod{729}$
$10000p+1000q+500+70+r\equiv 0\pmod{729}$ Now I don't know how to complete my work ?
Note that if $729\times m$ is a 5-digit number, then $m\lt100{,}000/729=137.174\ldots$. Now if $729m=pq57r$ for some digits $p$, $q$ and $r$, then in particular we have
$$729m\equiv570+r\pmod{1000}$$
with $0\le r\le9$, so we can see which digit(s) $r$ allow for a solution of this congruence with a value of $m$ that is less than $137$. To do this, we need to compute the inverse of $729$ mod $1000$. Since $729=3^6$ and the inverse of $3$ mod $1000$ is $-333$, the inverse of $729$ is
$$(-333)^6=333^6=333^3\cdot3^3\cdot111^3\equiv-111^3\equiv-631\equiv369\pmod{1000}$$
(where the tricky part was to cube the $111$, keeping only the last three digits). Thus
$$m\equiv369(570+r)\equiv330+369r\pmod{1000}$$
(using a calculator to obtain $369\cdot570=210{,}330$ to get the $330$) We now have ten things to compute:
$$\begin{align} r=0&\implies330+369r=330\\ r=1&\implies330+369r=699\\ r=2&\implies330+369r=1068\\ r=3&\implies330+369r=1437\\ r=4&\implies330+369r=1806\\ r=5&\implies330+369r=2175\\ r=6&\implies330+369r=2544\\ r=7&\implies330+369r=2913\\ r=8&\implies330+369r=3282\\ r=9&\implies330+369r=3651 \end{align}$$
Among these, only $r=2$ gives a value for $m$ mod $1000$, namely $m=68$, that is less than $137$. Computing, we have
$$729\times68=49572$$
so $p=4$, $q=9$, and $r=2$.
Remark: There may be some easier way to show that $r=2$ is the only solution, but it's not all that hard to compute all ten values