For a positive integer $n$, let $f(n)$ be the number of divisors of $n$ which are perfect squares, and let $g(n)$ be the number of divisors of $n$ which are perfect cubes. Determine whether there exists an integer $n$ such that

$$
\frac{f(n)}{g(n)}=2012
$$
If $n$ has the prime factorization

$$
n=p_{1}^{e_{1}} p_{2}^{e_{2}} \cdots p_{k}^{e_{k}}
$$

then the divisors of $n$ which are perfect squares are the numbers of the form

$$
p_{1}^{2 a_{1}} p_{2}^{2 a_{2}} \cdots p_{k}^{2 a_{k}}
$$

where each $a_{i}$ is an integer such that $0 \leq a_{i} \leq e_{i} / 2$. There are $\left\lfloor e_{i} / 2\right\rfloor+1$ such integers, and we conclude that

$$
f(n)=\left(\left\lfloor\frac{e_{1}}{2}\right\rfloor+1\right)\left(\left\lfloor\frac{e_{2}}{2}\right\rfloor+1\right) \cdots\left(\left\lfloor\frac{e_{k}}{2}\right\rfloor+1\right) .
$$

By the same argument we find that

$$
g(n)=\left(\left\lfloor\frac{e_{1}}{3}\right\rfloor+1\right)\left(\left\lfloor\frac{e_{2}}{3}\right\rfloor+1\right) \cdots\left(\left\lfloor\frac{e_{k}}{3}\right\rfloor+1\right),
$$

and thus the problem reduces to writing 2012 as a product of factors of the form

$$
\frac{\lfloor x / 2\rfloor+1}{\lfloor x / 3\rfloor+1}
$$

for various positive integers $x$. Taking $x=2(2012-1)$ gives a fraction whose numerator is 2012 , and this procedure can be applied iteratively:

$$
2012=\frac{2012}{1341} \cdot \frac{1341}{894} \cdot \frac{894}{596} \cdot \frac{596}{397} \cdot \frac{397}{265} \cdot \frac{265}{177} \cdot \frac{177}{118} \cdot \frac{118}{79} \cdot \frac{79}{53} \cdot \frac{53}{35} \cdot \frac{35}{23} \cdot \frac{23}{15} \cdot \frac{15}{10} \cdot \frac{10}{7} \cdot \frac{7}{5} \cdot \frac{5}{3} \cdot \frac{3}{2} \cdot \frac{2}{1}=\frac{f(n)}{g(n)}
$$

where $n=2^{4022} \cdot 3^{2680} \cdot 5^{1786} \cdot 7^{1190} \cdot 11^{792} \cdot 13^{528} \cdot 17^{352} \cdot 19^{234} \cdot 23^{156} \cdot 29^{104} \cdot 31^{68} \cdot 37^{44} \cdot 41^{28} \cdot 43^{18} \cdot 47^{12} \cdot 53^{8} \cdot 59^{4} \cdot 61^{2}$.