How many $n$ integers are there in the $\left[1 ; 10^{6}\right]$ interval for which the equation $n=x^{y}$ has a solution consisting of an integer pair, such that $x \neq n$?
The task asks how many true powers can be found in the interval $\left[1,10^{6}\right]$. Since $2^{20}>10^{6}>2^{19}$, no exponent can be greater than 19. It is sufficient to count only the powers with prime exponents, as for any composite number $y=u \cdot v$, $x^{y}$ can be expressed as $\left(x^{u}\right)^{v}$.

For any exponent $p$, $h(p)=\left[\sqrt[p]{10^{6}}\right]-1$ powers of $p$ fall into the interval $\left[1,10^{6}\right]$. (We subtract 1 because $1^{p}=1$ does not satisfy the condition of the problem.) The appropriate values of $h(p)$ are contained in the following table:

| $\mathrm{p}$ | 2 | 3 | 5 | 7 | 11 | 13 | 17 | 19 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $\mathrm{h}(\mathrm{p})$ | 999 | 99 | 14 | 6 | 2 | 1 | 1 | 1 |

This amounts to 1123 numbers in total, but note that certain powers - such as $64=8^{2}=4^{3}$ - have been counted multiple times. A power is counted multiple times precisely when it can be expressed as $x_{1}^{p_{1}}$ and $x_{2}^{p_{2}}$, where $p_{1}$ and $p_{2}$ are two different primes. If $p(m)$ denotes the exponent of a prime $p$ in the prime factorization of $m$, then for $x_{1}^{p_{1}}=x_{2}^{p_{2}}$, $p_{1} \cdot p\left(x_{1}\right)=p_{2} \cdot p\left(x_{2}\right)$ for all primes $p$. Since $p_{1} \neq p_{2}$, $p\left(x_{2}\right)$ must be divisible by $p_{1}$, and $p\left(x_{1}\right)$ by $p_{2}$, meaning $x_{1}=x^{p_{2}}$ and $x_{2}=x^{p_{1}}$ for some integer $x$. Therefore, during the counting process, we counted those powers $x^{y}$ multiple times where the exponent $y$ has more than one prime divisor; each was counted exactly as many times as the number of primes by which the exponent is divisible. The composite numbers not greater than 19 that have more than one prime divisor are: $6,10,12,14,15,18$. Since each of these is divisible by exactly two primes, the powers of the form $x^{6}, x^{10}, x^{12}, x^{14}, x^{15}, x^{18}$ were counted twice. Among these, $x^{12}=\left(x^{2}\right)^{6}$ and $x^{18}=\left(x^{3}\right)^{6}$, so we only need to consider the powers of the form $x^{6}, x^{10}, x^{14}$, and $x^{15}$. The number of such powers in the interval $\left[1,10^{6}\right]$ is 9, 2, 1, and 1, respectively. The number of true powers is thus $1123-13=1110$. We must also add 1, as $1=2^{0}$. Therefore, there are 1111 numbers in the interval $\left[1,10^{6}\right]$ that can be expressed in the desired form.