<s>[INST] For how many natural numbers $X(X+1)(X+2)(X+3)$ has exactly three different prime factors? 
For how many natural numbers $X(X+1)(X+2)(X+3)$ has exactly three different prime factors?

My attempt:
I have used a hit and trial approach. I found out that only for x=2 and x=3 this is happening. But how can I be sure of it? Is there any general approach?
 [/INST] It's obvious that $x$ can only be the form $2^a,3^b,p^c,2^a3^b,3^bp^c$ or $2^ap^c$. I solved the case when $x=2^a3^b$ (and hope the others are similar).
First, if $a\ge 1$ and $b\ge 1$, then $2^a3^b+1$ must be the power of a prime $p$ different from $2$ and $3$. Also $2^a3^b+2=2(2^{a-1}3^b+1)$, and $2^{a-1}3^b+1$ can not be divisible by $p$ (otherwise $p|2^a3^b-2^{a-1}3^b$ or $p|2$, contradiction) and by $3$, thus $2(2^{a-1}3^b+1)$ is a power of $2$, which means $a=1$. Consider $x+3=3(2\cdot 3^{b-1}+1)$, and in a similar way we can conclude $b=1$. Then $x=6$.
Cases $a=0$ or $b=0$ is similarly solved.
</s>