In Matsumura's ''Commutative ring theory'' he proves the folowing: If $A$ is a regular UFD, the ring of formal series $A[\![ X ]\!]$ is a UFD (page $165$). Just below he says that we can't drop regularity from the hypotesis, whitout giving any counterexample. Is there a non-insane example of UFD $A$ such that $A[\![X]\!]$ is not?
Being a bit optimistic, is true that for every non-regular UFD $A$ the ring $A[\![X]\!]$ is not a UFD?
The wiki page on UFDs offers this example:
Let $R$ be $k[x,y,z]/(x^2+y^3+z^7)$ localized at $(x,y,z)$. Then $R$ is a UFD but $R[[X]]$ is not.
Update: looking through the links that we've found since I posted this, there's a reference to
Which uses this example but also demands $k$ is a perfect field of characteristic $2$. Even then, the reasoning is quite involved and probably too much for a solution here. Currently the paper is open to all, so it will have to do.
That was the early days of the example, so perhaps someone has found a more streamlined explanation since then.