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. 
 A: The polynomial $1+3x$ has no inverse in $\mathbb{Z}_6[x]$. This can be shown using the evaluation map. Say it did have an inverse $p(x)$, so then $(1+3x)p(x)=1$. Evaluate at $x=1$ to get $4p(1)=1$. But this isn't possible; no number times $4$ equals $1$ mod $6$. So we get a contradiction.
This argument doesn't work in $\mathbb{Z}_6[[x]]$, the ring of formal power series with coefficients in $\mathbb{Z}_6$, because there is no evaluation-at-$1$ map $\mathbb{Z}_6[[x]]\to\mathbb{Z}_6$. This isn't particular to integers mod $6$ either; if we consider $\mathbb{Z}[[x]]$, the ring of formal power series with coefficients in $\mathbb{Z}$, we cannot "evaluate" $\sum_{n=0}^\infty n!x^n=x+2x^2+6x^3+24x^4+\cdots$ at $x=1$ either.
An alternative argument to showing $1+3x$ has no inverse in $\mathbb{Z}_6[x]$ is to show its putative inverse would have infinitely many nonzero coefficients, which is impossible for polynomials. Write
$$ 1 = (1+3x)(a_0+a_1x+a_2x^2+\cdots) = a_0+(3a_0+a_1)x+(3a_1+a_2)x^2+\cdots $$
Solving gives $a_0=1$, $a_1=3$, $a_2=3$, $a_3=3$, etc. (all of the rest of the coefficints are $3$). However within $\mathbb{Z}_6[[x]]$ this is not a contradiction, since formal power series can have infinitely many nonzero coefficients. Not only is this not a disproof of an inverse, it actually is actually a solution for the inverse: $(1+3x)^{-1}=1+3x+3x^2+\cdots$.
The geometric sum formula works here for the same reason it works in other settings. Have you ever seen a proof of the formula? Observe $(1-u)(1+u+u^2+\cdots)$, after distributing and cancelling an infinite number of terms leaves just $1$ left. In particular, $1+3x+3x^2+\cdots$ is called the inverse of $1+3x$ because multiplying the two together in $\mathbb{Z}_6[[x]]$ gives $1$.
A: You need to show that 
$$(1 + 3x + 3x^2 + 3x^3 + \cdots)(1 + 3x) = 1$$
using the addition and multiplication rules in $\Bbb Z_6[[x]]$. The element $1 + 3x + 3x^2 + 3x^3 + \cdots$ is $\sum\limits_{j = 0}^\infty 3x^j$, so over $\Bbb Z_6[[x]]$ we write
$$\left(\sum_{j = 0}^\infty 3^jx^j\right)(1 + 3x) = \sum_{j = 0}^\infty (3x^j + 3x^{j+1}) = 1 + \sum_{j = 1}^\infty 3x^j + \sum_{j = 0}^\infty 3x^{j+1} = 1 + 2\sum_{j = 1}^\infty 3x^j$$
Now since $3^j \equiv 3\pmod 6$ for all $j \ge 1$, 
$$2\sum_{j = 1}^\infty 3^jx^j = 2\sum_{j = 1}^\infty 3x^j = \sum_{j = 1}^\infty 6x^j = 0$$
and so $$\left(\sum_{j = 0}^\infty 3^jx^j\right)(1 + 3x) = 1$$
A: 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]]$
A: The following more general result is true for polynomials with coefficients in a unitary commutative ring:
Lemma $1+ax$ is invertible in $R[X]$ if and only if $a^n=0$ for some $n>0$.
Proof: $\Leftarrow$: Since $a^n=0$ we have $a^{2n+1}=0$. Then 
$$(1+ax)(1-ax+a^2x^2+...+a^{2n}x^{2n})=1+a^{2n+1}x^{2n+1}=1$$
$\Rightarrow$.
$$(1+ax)(b_0+b_1x+...+b_nx^n)=1$$
gives
$$b_0=1 \\
b_1+ab_0=0 \Rightarrow b_1=-a \\
b_2+ab_1=0 \Rightarrow b_2=a^2 \\
....\\
b_n+ab_{n-1}=0 \Rightarrow b_n=(-1)^na^n \\
b_n=0\Rightarrow a^n=0 \\ $$
P.S. Same way you can prove that $a_0+a_1x+...+a_nx^n$ is invertible if and only if $a_0$ is invertible and $a_1,..,a_n$ are nilpotent.
