It is said that every prime except $2$ or $3$ can be represented as $(6n+1)$ or $(6n-1)$. But when it comes to number $1007$, it can also be represented as $(6 \cdot 168-1)$ then
Why is $1007$ not prime?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityIt is said that every prime except $2$ or $3$ can be represented as $(6n+1)$ or $(6n-1)$. But when it comes to number $1007$, it can also be represented as $(6 \cdot 168-1)$ then
Why is $1007$ not prime?
Every prime except $2$ or $3$ is of the form $6n\pm1$, but not every number of the form $6n\pm1$ is prime
Not all numbers of the form $6n \pm 1$ are prime. Take for example, $n = 4$. $6n + 1 = 6(4) + 1 = 25$. Or, $n = 6$, which produces $6n - 1 = 6(6) - 1 = 35.$
A number of the form $6n\pm1$ can never have $2$ or $3$ as a factor, and $\frac{2}{3}$ of all numbers have one or both of those as a factor. That said, there is no further information in the form of the number per se which tells us about any other possible factors. It might be prime, or it might be composite and have prime factors. As other answers and comments have shown, there are plenty of numbers of the form $6n\pm1$ that have prime factors, and $1007$ is demonstrably one of them. In that case, $1007$ is not a prime number for the sole reason that it does not fit within the definition of a prime number. There is no further mathematical or mysterious reason why that is the case.