A positive integer with exactly four positive factors is called "quadly". Compute the least $n$ for which each of $n,n+1$ and $n+2$ is quadly. (ARML 2008)
My method of attacking this problem started by first noting that for each quadly number the prime factorisation must be of the form $pq$ ($p$ and $q$ are unique prime factors) or $m^3$ (where $m$ is prime). Then I also noted since the 3 numbers are consecutive, one of them must have a factor of 3 and atleast 1 of them must have a factor of 2. We start off by assuming that $n$ is even and so it is of the form $2q$. Then $n+2$ must also be even and be of the form $2p$. Subtracting the two equations we get $2p-2q=2 \implies p=q+1$. This means that $p$ and $q$ are consecutive and they're both primes. This only gives the possibility that $(p,q)=(3,2)$. Plugging this back in we get that the three numbers are $4,5,6$ but $4$ and $5$ are clearly not quadly. Hence we have a contradiction and so $n$ must be odd which means that $n+1$ must be even. We also know that one of the three integers is also a multiple of 3. From here I kind of brute-forced my way by finding prime multiples of 2, i.e. finding $2p$, where $p$ is an odd prime and checking $2p-1$ and $2p+1$ to see if they were quadly or not. Doing so I found that for $p=17$ yields the first solution of three consecutive quadly numbers which is $33,34,35$.
However, I'm looking for a more systematic approach which instead of using brute force for the rest of the problem, actually derives the answer mathematically. I'm sure there is a way to do but I can't think of one. Any help would be appreciated.