$[4]_{17}[x]_{17} = [2]_{17}$: How to optimally solve this equality. This notation is found in Concrete Introduction to Higher Algebra.
Here is my method:

For something like $[3]_{11}[x]_{11}^2=[4]_{11}$ I've just been using C++ code like this:
#include <iostream>
using namespace std;
int main()
{
for(int j = 1 ; j<10 ; j++)
{
cout<< "{...,";
for(int i = -5 ; i<=10 ; i++)
{
cout << 11*i+2*j*j << ",";
}
cout << "...}";
cout << endl << endl;
}

return 0;

}
 A: Algorithmic method
I would use the Euclid-Wallis Algorithm to solve $17x+4y=1$:
$$
\begin{array}{r}
&&4&4\\\hline
1&0&1&-4\\
0&1&-4&17\\
17&4&1&0\\
\end{array}
$$
This says that $17(1)+4(-4)=1$. This means that $-4\equiv13\pmod{17}$ is the inverse of $4$ mod $17$. To get $2$, just double to get $26\equiv9\pmod{17}$. Thus,
$$
4\cdot9\equiv2\pmod{17}
$$

Non-algorithmic method
We're trying to solve $4x\equiv2\pmod{17}$ which would be $x=\frac12$ if we could divide by $2$. However, we can divide $1\equiv18\pmod{17}$ by $2$ to get $x=9$. Care must be taken; we can only divide by numbers which are relatively prime to the modulus.
A: Note that $4\cdot 4=16\equiv -1\pmod{17}$, hence $1/4=-4\pmod{17}$ (meaning nothing else but $(-4)\cdot 4\equiv 1$), so we have to solve
$$\begin{align} 4x&\equiv 2 &\pmod{17} \\ 
x&\equiv (-4)\cdot 2&\pmod{17} \end{align}$$
That is, $x\equiv -8\equiv 9\pmod{17}$ is the solution.
A: You're looking at $$4x\equiv 2\mod 17$$
Since $(4,17)=1$; this has a unique solution, and it can be found by finding the inverse for $4$ modulo 17. But $4\times 4 =16\equiv -1\mod 17$, so $-4\equiv 13\mod 17$ is the inverse of $4$. It follows that $$13\cdot 4x=13\cdot 2\mod 17$$
$$x=13\cdot 2\mod 17$$
$$x=9\mod 17$$
A: If you knew the inverse of $4 \pmod{17}$, you could multiply it on each side of your equation and compute $x$. Let $a$ be the inverse of $4 \pmod{17}$, that is, $4*a\equiv1\pmod{17}$. To find $a$, find a number that's congruent to $1\pmod{17}$ and divisible by 4, then divide it by 4. So start with 1 and add 17's until you get a multiple of 4, then divide by 4. You can do this calculation more easily modulo 4, noticing that $17\equiv1\pmod{4}$, so $1+3*17=52$ is divisible by 4, giving $a=13$. Now multiply each side of your equation by 13, to find $x\equiv 2*13 \pmod{17}\equiv26 \pmod{17} \equiv 9 \pmod{17}$.
