Let $g(n)$ be the product of the proper positive integer divisors of $n$. (Recall that a proper divisor of $n$ is a divisor other than $n$.) For how many values of $n$ does $n$ not divide $g(n)$, given that $2 \le n \le 50$?
I'm aware of the terminology regarding proper divisors. However, I was not able to crack this problem in under 10 minutes.
Thought Process 1: Find all primes between 2 and 50. However, this returned the wrong answer.
Thought Process 2: I thought of brute forcing the answer, but that seemed too long.
Finally, I ended up getting an answer (which was correct), but I needed a faster way. Does anyone know a way to get the answer (in under 10 minutes)?