System of equations modulo $n$ Suppose we have the following system of equations module $n$
\begin{align*}
2x-y & \equiv 1\mod{n}\\
4x+3y & \equiv 2 \mod{n}
\end{align*}
Determine the integers $n$ for which the system has solutions.
I have posted my solution as an answer below.
 A: Let's derive the answer using general methods. First triangularize:  $ $ eliminate $\,y\,$ by substituting $\, y\equiv 2x\!-\!1\,$ into the second equation, yielding the following equivalent system
$$\begin{align} y\,-\,2x&\equiv -1\!\!\!\pmod{\!n}\\ 10x&\equiv \ \ 5\!\!\pmod{\!n}\end{align}\qquad$$
This is solvable $\!\iff\! 10x\equiv 5\pmod{\!n}\,$ is solvable $\!\iff\! \color{#c00}{\gcd(10,n)\mid 5},\,$ by this criterion.
If $\ 2\mid n\ $ then $\,\color{#90f}{10x}\equiv \color{#0a0}5\pmod{\!n}\,$ persists $\!\bmod 2,\,$ reducing to $\,\color{#90f}0\equiv \color{#0a0}1\pmod{\!2},\,$ contradiction.
So $\,2\nmid n,\,$ so Euclid $\,\Rightarrow\, \color{#c00}{\gcd(10,n)} = \gcd(5,n)\,$ which does $\rm\color{#c00}{divide\ 5},\,$ confirming solvability.
Remark $\ $ Likely your solution arose by eliminating $\,x\,$ to obtain
$$\begin{align}  2x-y&\equiv 1\!\!\pmod{\!n}\\ 5y&\equiv 0\!\!\pmod{\!n}\end{align}\qquad$$
then noticing an "obvious" solution $\,y\equiv 0\,\Rightarrow\, x\equiv 1/2,\,$ which exists by $\,n\,$ is odd (vs. opposite order above, where we notice an "obvious" solution $\,x\equiv 1/2\,\Rightarrow\, y\equiv 0).$
A: The system has solutions if and only if $n$ is odd.
Proof: If $n$ is odd, then notice that $2x=1 \mod{n}$ has a solution since $\gcd(2, n) = 1$ and so $2$ has a multiplicative inverse $\mod{n}$. Such an $x$ obviously satisfies $4x \equiv 2 \mod{n}$. Thus, $(x, 0)$ would be solution to the system.
On the other hand, if $n$ is even, then since $2x-1$ is odd, from the first equation we conclude that $y$ has to be odd. But, then $4x + 3y$ would be odd so it can't have an even remainder $2$ modulo an even number $n$; a contradiction. Thus, there are no solutions in this case. This ends the proof.
A: Let $2x-y=1+an$ and $4x+3y=2+bn$ where $a,b$ are integers
$2+bn=4x+3(2x-1-an)\iff5(2x-1)=(3a+2b)n$
As $(3,2)=1, $ any integer can be expressed in terms of $3a+2b$
Let us find $a,b$ such that $3a+2b=5c\iff3(a-c)=2(c-b)$
$\dfrac{2(c-b)}3=a-c$ which is an integer
$\implies3|2(c-b)\iff3|(c-b),c-b=3d$ (say for some integer $d$) 
$\implies b=c-3d,a=c+2d$
$\implies2x-1=cn$ 
As the the left hand side is odd, the above equation will have a solution iff $n$ is odd
Please check for $y$
