See and for nonvanishing of local Picard groups in general.

Example 88.9.2. The ring $A = \mathbf{C}[[x, y, z]]/(x^ r + y^ s + z^ t)$ is not a UFD when $1 < r < s < t$ are pairwise coprime integers and not equal to $2, 3, 5$. For example consider the special case $A = \mathbf{C}[[x, y, z]]/(x^2 + y^5 + z^7)$. Consider the maps

$\psi _\zeta : \mathbf{C}[[x, y, z]]/(x^2 + y^5 + z^7) \to \mathbf{C}[[t]]$

given by

$x \mapsto t^7,\quad y \mapsto t^3,\quad z \mapsto -\zeta t^2(1 + t)^{1/7}$

where $\zeta$ is a $7$th root of unity. The kernel $\mathfrak p_\zeta$ of $\psi _\zeta$ is a height one prime, hence if $A$ is a UFD, then it is principal, say given by $f_\zeta \in \mathbf{C}[[x, y, z]]$. Note that $V(x^3 - y^7) = \bigcup V(\mathfrak p_\zeta )$ and $A/(x^3 - y^7)$ is reduced away from the closed point. Hence, still assuming $A$ is a UFD, we would obtain

$\prod \nolimits _\zeta f_\zeta = u(x^3 - y^7) + a(x^2 + y^5 + z^7) \quad \text{in}\quad \mathbf{C}[[x, y, z]]$

for some unit $u \in \mathbf{C}[[x, y, z]]$ and some element $a \in \mathbf{C}[[x, y, z]]$. After scaling by a constant we may assume $u(0, 0, 0) = 1$. Note that the left hand side vanishes to order $7$. Hence $a = - x \bmod \mathfrak m^2$. But then we get a term $xy^5$ on the right hand side which does not occur on the left hand side. A contradiction.

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).