4

First I used that $x \equiv 1\pmod{3}$, so that $x=3k+1$ for some $k$.

Then I put it in the next equation so $(3k+1)^3+(3+k)+1\equiv 81k^3+81k^2+12k+3\equiv 0\pmod{81}$,

So $12k+3\equiv 0\pmod{81}$ Then I divided it by $3$ (Is this possible and why is this possible?) to get $4k+1\equiv 0\pmod{27}$.

Next step was to find the inverse of 4 in $\mathbb{Z}/27\mathbb{Z}$ via Euclidean algorithm which is 7. So $k\equiv -7\equiv 20\pmod{27}$.

So I come to the solution that $x=20*3+1=61$ which works. However, I want to find a more elegant way or is this the normal approach to find a solution?

Alex M.
  • 35,207
deavor
  • 977

1 Answers1

0

You may indeed divide by $3$ in $12k+3 \equiv 0 \pmod{81}$. Indeed, the solutions are precisely those $k$ such that there is $n$ with $12k+3 = 81n$; but that is precisely those $k$ such that there is $n$ with $4k+1 = 27n$; and that is precisely the statement that $4k+1 \equiv 0 \pmod{27}$.

As others have mentioned, Hensel lifting is a way to generalise this.