# 2014 AMC 12A Problems/Problem 18

## Problem

The domain of the function $f(x)=\log_{\frac12}(\log_4(\log_{\frac14}(\log_{16}(\log_{\frac1{16}}x))))$ is an interval of length $\tfrac mn$, where $m$ and $n$ are relatively prime positive integers. What is $m+n$?

$\textbf{(A) }19\qquad \textbf{(B) }31\qquad \textbf{(C) }271\qquad \textbf{(D) }319\qquad \textbf{(E) }511\qquad$

## Solution 1

For simplicity, let $a=\log_{\frac{1}{16}}{x},b=\log_{16}a,c=\log_{\frac{1}{4}}b$, and $d=\log_4c$.

The domain of $\log_{\frac{1}{2}}x$ is $x \in (0, \infty)$, so $d \in (0, \infty)$. Thus, $\log_4{c} \in (0, \infty) \Rightarrow c \in (1, \infty)$. Since $c=\log_{\frac{1}{4}}b$ we have $b \in \left(0, \left(\frac{1}{4}\right)^1\right)=\left(0, \frac{1}{4}\right)$. Since $b=\log_{16}{a}$, we have $a \in (16^0,16^{1/4})=(1,2)$. Finally, since $a=\log_{\frac{1}{16}}{x}$, $x \in \left(\left(\frac{1}{16}\right)^2,\left(\frac{1}{16}\right)^1\right)=\left(\frac{1}{256},\frac{1}{16}\right)$.

The length of the $x$ interval is $\frac{1}{16}-\frac{1}{256}=\frac{15}{256}$ and the answer is $\boxed{271 \text{ (C)}}$.

## Solution 2

The domain of $f(x)$ is the range of the inverse function $f^{-1}(x)=\left(\frac1{16}\right)^{16^{\left(\frac14\right)^{4^{\left(\frac12\right)^x}}}}$. Now $f^{-1}(x)$ can be seen to be strictly decreasing, since $\left(\frac12\right)^x$ is decreasing, so $4^{\left(\frac12\right)^x}$ is decreasing, so $\left(\frac14\right)^{4^{\left(\frac12\right)^x}}$ is increasing, so $16^{\left(\frac14\right)^{4^{\left(\frac12\right)^x}}}$ is increasing, therefore $\left(\frac1{16}\right)^{16^{\left(\frac14\right)^{4^{\left(\frac12\right)^x}}}}$ is decreasing.

Therefore, the range of $f^{-1}(x)$ is the open interval $\left(\lim_{x\to\infty}f^{-1}(x), \lim_{x\to-\infty}f^{-1}(x)\right)$. We find: \begin{align*} \lim_{x\to-\infty}\left(\frac1{16}\right)^{16^{\left(\frac14\right)^{4^{\left(\frac12\right)^x}}}}&= \lim_{a\to\infty}\left(\frac1{16}\right)^{16^{\left(\frac14\right)^{4^a}}}\\ &= \lim_{b\to\infty}\left(\frac1{16}\right)^{16^{\left(\frac14\right)^b}}\\ &= \left(\frac1{16}\right)^{16^0}\\ &= \frac{1}{16}. \end{align*}

Similarly, \begin{align*} \lim_{x\to\infty}\left(\frac1{16}\right)^{16^{\left(\frac14\right)^{4^{\left(\frac12\right)^x}}}}&=\left(\frac1{16}\right)^{16^{\left(\frac14\right)^{4^0}}}\\ &= \left(\frac1{16}\right)^{16^{\frac14}}\\ &= \left(\frac1{16}\right)^2\\ &= \frac{1}{256}. \end{align*} Hence the range of $f^{-1}(x)$ (which is then the domain of $f(x)$) is $\left(\frac{1}{256},\frac{1}{16}\right)$ and the answer is $\boxed{271 \text{ (C)}}$.