Let $R$ be Noetherian domain. For $f,g \in R$, define the ideal $I_{fg}=\{h\in R \mid hg\in(f)\}$. Prove $R$ is UFD iff $I_{fg}$ is principal for all $f,g\in R$.
I'm stuck at this problem. The condition for a ring to be UFD on top of my head is Kaplansky's theorem. However I don't think I could make use of that theorem here since it involves considering all prime ideals. Also I don't really know how to make use of $R$ being noetherian. Any ideas to prove this?
Suppose $I_{fg}$ is principal for all $f,g$.
Since $R$ is Noetherian, all elements can be written as a finite product of irreducibles. I.e., $R$ is atomic.
Now all we need to do is show that irreducibles are prime. Let $f$ be irreducible in $R$. Now consider $g\not\in (f)$, and consider $I_{fg}=(h)$. Then we know that $fg\in (f)$ by definition, so $f\in I_{fg}$. Thus $f=hk$ for some $k\in R$. However, $f$ is irreducible, and $h$ is not a unit, because in that case $g$ would be in $(f)$, contradicting our choice of $g$. Thus $f\mid h$. Therefore if $xg\in (f)$, we have that $f\mid h\mid x$, so $x\in (f)$. Thus $f$ is prime.
For the opposite direction, note that if $R$ is a UFD, then $I_{fg}$ is generated by $\operatorname{lcm}(f,g)/g=f/\operatorname{gcd}(f,g)$.