Infinite distinct factorizations into irreducibles for an element Consider the factorization into irreducibles of $6$ in $\mathbb{Z}[\sqrt{-5}]$. We have $6=2 \times 3$ and  $6=(1+\sqrt{-5}) \times (1-\sqrt{-5})$, i.e. $2$ distinct factorizations. And,
 $$6^2=3 \times 3\times2\times2$$
$$=(1+\sqrt{-5}) \times (1-\sqrt{-5}) \times (1+\sqrt{-5}) \times (1-\sqrt{-5})$$
$$=(1+\sqrt{-5}) \times (1-\sqrt{-5})\times3\times2.$$
More generally, $6^n$ will have $n+1$ distinct factorizations into irreducibles in $\mathbb{Z}[\sqrt{-5}]$ by a simple combinatorial argument. But, can we construct a ring in which there exists an element that has an infinite number of distinct factorizations into irreducibles? To make life harder, can we construct an extension of $\mathbb{Z}$ in which this happens? I have been thinking about this for a while and have managed to find no foothold.. Any help is appreciated.
 A: Hint $\:$ Let $\rm R = \mathbb R + x\:\mathbb C[x],\:$ i.e. the ring  of all polynomials with complex coefficients and real constant coefficient. Here $\rm\:x^2\:$ has infinitely many distinct factorizations into irreducibles 
$$\rm x^2\ =\ (c\: x)\: (c^{-1}\: x),\quad c = r + {\it i},\quad \forall\: r\in \mathbb R$$  
The factors are nonassociate irreducibles in $\rm R$ since, for $\rm\:r,s\in \mathbb R$
$$\rm (r+{\it i})x\ |\ (s+{\it i})x\ \ in\ \ R\iff \frac{(s+{\it i})\:x}{(r+{\it i})\:x}\in R\iff \frac{s+{\it i}}{r+{\it i}}\in \mathbb R\iff r = s$$
Note $\:$ Such constructions are often used by ring theorists since they yield a very rich source of (counter-) examples, e.g. see   $\ $ M. Zafrullah, Various facets of rings between $\rm\:D[X]\:$ and $\rm\:K[X].$
A: Let $\mathbb{A}$ be an abbreviation for $\mathbb{Z}[\sqrt{-5}]$. Let $I$ be an infinite index set, in our case specifically the non-zero integers, and let $D$ be a non-principal ultrafilter on $I$. 
Consider the ultrapower $\mathbb{A}^I/D$. Briefly, the elements of $\mathbb{A}^I/D$
are the equivalence classes of functions $f: I\to \mathbb{A}$, where we say that two functions $f$ and $g$ are equivalent modulo $D$ if $\{i:f(i)=g(i)\}\in D$.  Addition and multiplication are defined coordinatewise modulo $D$.
The structure $\mathbb{A}^I/D$ has the very nice feature that every first order sentence in the language of rings which is true in $\mathbb{A}$ is true in $\mathbb{A}^I/D$.
Let $f: I\to \mathbb{A}$ be defined by $f(i)=6^i$.  Then $f/D$ has infinitely many factorizations as a product of irreducibles.
Another way: Or else one can use the Compactness Theorem. Let $\mathcal{L}$ be the language of ring theory, augmented by a constant symbol for every element of $\mathbb{A}$, and an additional constant symbol $c$. Let $T$ be the theory whose axioms are all sentences of $\mathcal{L}$ that are true in $\mathbb{A}$. 
Form the theory $T'$ by adding to $T$ the infinitely many axioms $\varphi_n(c)$, where $\varphi_n(c)$ "says" that $c$ is a product of $n$ irreducibles in at least $n$ "really distinct" ways. For any $n$, one can produce a sentence $\varphi_n(c)$ of $\mathcal{L}$ that does the job.  
Note that for any finite subset $F$ of $T'$, there is an interpretation of $c$ in $\mathbb{A}$ such that with that interpretation, the structure $\mathbb{A}$ is a model of $F$.  So by the Compactness Theorem, the theory $T'$ has a model $\mathbb{A}^\ast$.  The interpretation $c^\ast$ of $c$ in $\mathbb{A}^\ast$ satisfies all of the $\varphi_n$, so $c^\ast$ can be expressed as a product of irreducibles in infinitely many ways. 
The ultrapower construction of the first solution can be thought of as a sort of explicit way to construct a structure with the properties of $\mathbb{A}^\ast$.
A: Let $X_1,Y_1,X_2,Y_2,\dots$ be indeterminates, and put 
$$
A:=\mathbb Q[X_1,Y_1,X_2,Y_2,\dots]/I,
$$
where $I$ is the ideal generated by the elements $X_nY_n-X_1Y_1$ for $n=2,3,\dots$, and define the elements $x_1,y_1,x_2,y_2,\dots$ of $A$ as being the respective canonical images of $X_1,Y_1,X_2,Y_2,\dots$. 
Then the $x_n$ and $y_n$ are irreducible and non-associate, and $x_1y_1$ is equal to $x_ny_n$ for all $n$.
EDIT. The simplest way to prove rigorously the above assertions is perhaps to use Bergman's Diamond Lemma. 
A statement of the Lemma is given on this n-Lab page. 
The precise reference is:
The Diamond Lemma for Ring Theory, Advances in Mathematics, Volume 29, Issue 2, February 1978, Pages 178-218, George M Bergman. 
Here is a non-free access to the article. (It belongs to Elsevier...).
I'm sure some proofs of the Diamond Lemma are available on the web, but I haven't been able to find any. If you know one, please tell me, or edit this answer. Thanks in advance.
A: If you are only interested in behaviour in the ring of integers of a number field (such as $\mathbb{Z}[\sqrt{-5}]$) then you will never get infinitely many different factorisations of an element.
These different factorisations come from reordering the (finitely many) prime ideals in the unique factorisation of the ideal generated by your element.
A: Here's a construction similar to the one used by Math Gems, in the first
answer. Let $\mathbb Q$, $\mathbb R$ be the fields of rational and real numbers respectively and let $X$ be an indeterminate over $\mathbb R$. Consider the ring $S=\mathbb Q+X\mathbb R[X]=\{f\in \mathbb R[X]:f(0)\in \mathbb Q\}$. That such a monstrosity is an integral domain, can be easily checked, say from the reference given by Math Gems. Note that a typical element $f$ of $S$ can be written as $f=q_{0}+\sum_{i=1}^{n}r_{i}X^{i}$ where $q_{0}\in \mathbb Q$ and $r_{i}\in \mathbb R.$ So
coefficients of $X$ are real numbers. (Any (nonzero) real number can be a
coefficient of $X$!)
Notice that as $S$ is a subring of $\mathbb R[X]$ every unit of $S$ is a unit of $\mathbb
R[X]$. So $u\in S$ is a unit if and only if $u$ is of degree zero if and
only if $u\in \mathbb Q.$ Thus $f\in S$ is a nonunit if and only if $\deg (f)>0.$
Now this can be used to establish the following  
Observation A: $S$ satisfies ACC on principal ideals and so is atomic, i.e.
every nonzero nonunit is expressible as a product of at most a finite number
of irreducible elements.
Illustration: Let $f,g\in S$ such that $fS\subsetneq gS.$ Then $f=gh$ where $%
h$ is not a unit and so is of positive degree. But then in $S,$ $g$ properly
divides $f$ implies that $\deg (g)<\deg (f).$ Now as $\deg (f)$ is finite
for each $f\in S$ and so $fS\subsetneq f_{1}S\subsetneq \dots\subsetneq f_{n}S$
... must stop after a number of steps.
Having established that $S$ is an atomic domain we now proceed to show that 
Observation B: $S$ is not a UFD.
Illustration: Note that $X$ is an irreducible element or atom, being of
degree $1$, but then so are$\frac{1}{\sqrt{2}}X,$ $\sqrt{2}X$ and all  $X,$ 
$\frac{1}{\sqrt{2}}X,$ $\sqrt{2}X$ belong to $S.$ Note that $X$ and $\frac{1}{%
\sqrt{2}}X$ are not associates, since $X/\frac{1}{\sqrt{2}}X=\sqrt{2}$ which
is not in $S$ and $\frac{1}{\sqrt{2}}X/X=\frac{1}{\sqrt{2}}$ which again is
not in $S.$ In a similar fashion we show that $X$ and $\sqrt{2X}$ are not
associates.
Now note that $X^{2}=(\sqrt{2}X)(\frac{1}{\sqrt{2}}X).$ So $X\mid (\sqrt{2}%
X)(\frac{1}{\sqrt{2}}X)$ yet $X$ does not divide either of $(\sqrt{2}X),(%
\frac{1}{\sqrt{2}}X).$ Now recall the definition of a prime element it is a
nonzero nonunit $p$ such that $p\mid ab$ implies that $p\mid a$ \ or $p\mid
b.$ So, in $S,$ $X$ is not a prime. Now one of the criteria for a domain to
be a UFD is: $D$ is a UFD if and only if every nonzero nonunit of $D$ is
expressible as a product of at most a finite number of irreducible elements
and every irreducible element is a prime. As we have shown that the
irreducible element $X$ in $S$ is not a prime we have essentially
established that $S$ is not a UFD.
Observation C: In $S$, the element $X^{2}$ can be expressed in an infinite
number of ways as a product of two irreducible elements which are not
associates of $X.$
Illustration: (i) Our first choice is noting the following. There are
infinitely many distinct positive primes $p$ in $\mathbb Z,$ the ring of integers,
and for each $p$ $\sqrt{p}$ is irrational and so $X^{2}=(\sqrt{p}X)(\frac{1}{%
\sqrt{p}}X).$ Works fine using the same argument as we used in case of  $%
X^{2}=(\sqrt{2}X)(\frac{1}{\sqrt{2}}X).$ 
(ii) There is one snag with the factorization in (i) and that is,  we have
not been able to express $X^{2}$ as product of two non-associated atoms in
infinitely many ways. For, it so happens that $(\sqrt{p}X)$ and $(\frac{1}{%
\sqrt{p}}X)$ are associates as $(\sqrt{p}X=p(\frac{1}{\sqrt{p}}X)$ . \ The
problem arises from the fact that $(\sqrt{p})^{2}p$ a rational number. That
can be solved by selecting a set of distinct irrational numbers $\{\alpha
_{i}\}$ such that  that for each $i$ $\alpha _{i}^{2}$ is irrational, taking 
$\alpha _{i}=$ $\sqrt[3]{p}$ for instance where $p$ ranges over distinct
positive primes of $Z.$ In this case $X^{2}=$ $(\alpha _{i}X)(\frac{1}{%
\alpha _{i}}X)$ where  $(\alpha _{i}X)$ and $(\frac{1}{\alpha _{i}}X)$ are
irreducible elements that are not associated to each other and of course
neither of $(\alpha _{i}X)$ and $(\frac{1}{\alpha _{i}}X)$ is an associate
to $X.$
Observation C, hopefully, does answer the question. I have taken the longer
route to include the usual concepts. Now here's something that I would like
folks to think about:
Question: How can we express $X^{3}$as a product of three irreducible
elements, in $S,$ as $X^{3}=(\alpha _{1}X)(\alpha _{2}X)(\alpha _{3}X)$ in
infinitely many ways, where $X$ is not an associate of any of $\alpha _{i}X.$ One
answer is simple. Note that $pX^{3}=(\sqrt[3]{p}X)^{3}$ for any positive
prime, but the answer will be more interesting if $(\alpha _{1}X),(\alpha
_{2}X),(\alpha _{3}X)$ are mutually non associated.
OK guys I have probably overused your hospitality and probably made some mistakes too. So feel free to point out if you find any.
