How to show $1+3x$ is a unit in $\mathbb{Z_6}[[x]]$ I am new to the subject of rings of formal power series. The problem is to show that $1+3x$ is a unit in $\mathbb{Z_6}[[x]]$, where $\mathbb{Z_6}[[x]]$ is the ring of formal power series with coefficients in $\mathbb{Z}_6$, also known as $ \mathbb{Z }/6\mathbb{Z}$. 
My work is as follows:
$ \begin{align} (1+3x)^{-1} &= \frac{1}{1+3x}
\\&= \frac{1}{1-(-3x)}
\\ &= 1 +(-3x) + (-3x)^2 + (-3x)^3 ... 
\\ &= 1 - 3x + 3^2x^2 -3^3x^3 ... 
\\ &=_6 1 + 3x +3x^2 + 3x^3 + ... \end{align}$
This is supposed to show that the inverse of $1 + 3x$ is $ 1 + 3x + 3x^2  + ...$ in the ring $\mod 6$. I am confused what this actually means. When I plug in $x =3$ into $1+3x$, this produces $4$ in mod 6 and there is no modular inverse of $4$. So why is $1+3x$ called the inverse?
I notice that we can check the calculation manually.
$\begin{align}( 1 + 3x) ( 1 + 3x + 3x^2 + 3x^3 + ...) &= 1 + 3x + 3x + 3^2x^2 + 3x^2 +...
\\ &=_6 1 + 3x + 3x + 3x^2 + 3x^2  +...
\\ &=_6 1 + 6x + 6x^2 + ...
\\ &=_6 1 + 0 + 0 + ...
\\ &=_6 1
\end{align}$
What bothers me is that some values you cannot plug into x, the modulo inverse is not defined. 

First at all $1+3x$ is an element of $\mathbb{Z_6}[[x]]$in which all the coefficients except $a_0=1$ and $a_1=3$ are nuls. Your expand of $\frac{1}{1+3x}$ modulo $6$ is correct. It follows, changing $3$ by its equivalent modulo $6$, which is $-3$.
$$(1+3x)(1-3x+3x^2-3x^3+....\pm3x^n\mp3x^{n+1}\pm.......)$$ This multiplication gives $$1+(3x+3x^2+3x^3+.....)+(-3x-3x^2-3x^3-.....)=1$$ Thus it is verified that
$1-3x+3x^2-3x^3+....\pm3x^n\mp3x^{n+1}\pm.......$ is in fact the inverse of $1+3x$ in $\mathbb{Z_6}[[x]]$
