Composite Numbers and Divisors Problem 10 What would be all the possible values of $Z$ if $Z$ had to be a positive composite number and if the product $2017\times Z$ would have precisely four divisors?

I thought that there would be no such composite numbers $Z$ because $Z$ has to be a prime number as the divisors would have to be the product itself, $2017$, $1$ and $Z$.

Is this correct?
The only numbers having exactly four divisors are those of the form $p_1p_2$ where the primes are distinct and of the form $p^3$. The only possibility is $Z=2017^2$ because of the given condition that $Z$ be composite.
Let $n$ be a positive integer with prime decomposition $n=p_1^{a_1}p_2^{a_2}p_3^{a_3}\cdots p_k^{a_k}$

Then the number of divisors of $n$ is $(a_1+1)(a_2+1)(a_3+1)\cdots (a_k+1)$

For a number to have precisely four divisors, then that implies that it will either be of the form $n=p_1^1p_2^1$ or it will be of the form $n=p_1^3$

For your specific problem, you notice first that $2017$ is prime and we want $n=2017\cdot Z$ to be a number with four divisors.  This implies that either $n=2017\cdot p$ for some prime $p\neq 2017$, or that $n=2017^3$ making $Z=2017^2$.

Since the problem had the stipulation that $Z$ must be composite, that rules out the first possibility making the only possibility $Z=2017^2$