# 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?

• $X = 6$ works fine as well. – Macavity Jan 7 '15 at 4:49

There is going to be a multiple of $2$ and a multiple of $3$, so there is only one prime remaining, notice each pair of numbers has a greatest common factor whose prime factors are $2$ and $3$. So you need for all the numbers except for one of them to be of the form $2^a3^b$. Notice out of $4$ consecutive numbers only one of them can be a multiple of $4$ and only one of them can be a multiple of $9$. Since there are $3$ numbers of the form $2^a3^b$ and at most two of these numbers have $a>1$ or $b>1$ we obtain at least one of these numbers is $2^a3^b$ with $a,b\leq 1$, so one of the numbers is $6,3,2$ or $1$.

• $X=1$ wont give three prime factors, but rest looks good...+1 – Macavity Jan 7 '15 at 5:00
• Yes, what I meant is that you need to have at least one of those numbers in the set $\{X,X+1,X+2,X+3\}$, You need to check with $X=1,2,3,4,5,6$ to get the final solution. – Jorge Fernández Hidalgo Jan 7 '15 at 5:02

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.

you can use the following expission

$$\displaylines{ x\left( {x + 1} \right)\left( {x + 2} \right)\left( {x + 3} \right) = x\left( {x + 3} \right)\left( {\left( {x + 1} \right)\left( {x + 2} \right)} \right) \cr = x\left( {x + 3} \right)\left( {x^2 + 3x + 2} \right) \cr}$$

$$\left( {x\left( {x + 3} \right) + 1} \right)^2 - 1 = x\left( {x + 1} \right)\left( {x + 2} \right)\left( {x + 3} \right)$$