Problem 607: (2016 AIME II, 11)
For positive integers $N$ and $k$, define $N$ to be $k$-nice if there exists a positive integer $a$ such that $a^{k}$ has exactly $N$ positive divisors. Find the number of positive integers less than $1000$ that are neither $7$-nice nor $8$-nice.
- If $a=\prod p_i^{e_i}$, then $\tau(a^k)=\prod(ke_i+1)\equiv1\pmod k$. Conversely, $N\equiv1\pmod k$ is $\tau(a^k)$ for $a=2^{(N-1)/k}$. So $N$ is $k$-nice iff $N\equiv1\pmod k$.
- Below $1000$, $143$ numbers are $\equiv1\pmod7$, $125$ are $\equiv1\pmod8$, and $18$ are $\equiv1\pmod{56}$.
- So $999-(143+125-18)=749$. The answer is $\boxed{749}$.
For positive integers $N$ and $k$, define $N$ to be $k$-nice if there exists a positive integer $a$ such that $a^{k}$ has exactly $N$ positive divisors. Find the number of positive integers less than $1000$ that are neither $5$-nice nor $6$-nice.