Always prime? $6n+1$ and/or $6n-1$, if neither divisible by $5$ nor semiprime

444 Views Asked by At

It seems that the sequence of all integers $N$ that are either $6n+1$ or $6n-1$ are all primes if $N$ is neither divisible by $5$ nor semiprime.

It also seems that this sequence of primes includes all primes greater than $5$.

Finally, it seems that the semiprimes thus removed from the original sequence constitute the sequence of all semiprimes having neither a factor of $2$ nor $5$.

Is all this true?

Thank you for your help, Rev20

5

There are 5 best solutions below

8
On

The set of numbers { $6n+1$, $6n-1$ } are all odd numbers that are not a multiple of $3$. By eliminating $5$ as per the condition, the next possible factors are $7$, $11$ and $13$. Their product is $1001$ which is in the set of $6n-1$. The product of any three or more primes greater than $5$ will produce a value within the main set (as well as two primes).

7
On
  1. No, there are numbers of the form $6n\pm 1$ which are neither multiples of 5 nor semiprime. For example:

    $$(57\cdot 6) + 1 = 343 = 7^3$$ or, if we want an example without repeated factors, $$(6\cdot 167) - 1 = 1001 = 7\cdot 11\cdot 13.$$

  2. Yes, the sequence $6n\pm 1$ includes all primes greater than 5. The reason is because the remainder modulo 6 can be 0,1,2,3,4,5. If the remainder is 0,2,4, then the number is even. If the remainder is 3, then the number is a multiple of 3. Prime numbers $p>5$ can't be even or multiples of 3; hence the only possible remainders are 1 and 5. Hence all prime numbers greater than 5 are equal to $6n\pm 1$ for some $n$.

  3. No, 21 = 7*3 = (6*3) + 3 is a semiprime which doesn't have 2 or 5 as a factor. It is left out of your sequence because it can't be written in the form $6n\pm 1$.

0
On

Yeah, if you only look at very small numbers.

Someone pointed out 49 in the comments, but that assumes you said "squarefree semiprime" rather than just "semiprime." Likewise 121 fits in with your assertion.

But what about $343 = 7^3$? In fact, $7^n \equiv 1 \pmod 6$ for all $n \geq 0$. More generally, any prime $p$ of the form $6k + 1$ will give $p^n \equiv 1 \pmod 6$ for any $n \geq 0$.

Things are a little more interesting on the $6k - 1$ branch, e.g., $333 = 3^2 \times 37$, but I leave that to you to ponder.

0
On

More pointedly, $6n - 1$ can have as many prime factors as you want, and $6n + 1$ can also have as many prime factors as you want, provided you don't want a negative number of prime factors.

A semiprime has two prime factors, not necessarily distinct, right? So then 49 and 169, which are both of the form $6n + 1$, are semiprimes, even though they are the squares of primes.

Then notice that $49 \times 169 = 8281 = 6 \times 1380 + 1$. Clearly 8281 is not prime, it's not divisible by 5, and it's not a semiprime, it has four prime factors. Though only two distinct prime factors.

So if you're not convinced, look at $8281 \times 19 = 157339 = 6 \times 26223 + 1$, which has five prime factors, three of them distinct. I can keep doing this until the numbers get too large for my computer to hold them.

It's very similar with $6n - 1$, with one important caveat: the number of prime factors congruent to $-1 \pmod 6$ needs to be odd. For example, $11 \times 17 \times 23 = 4301 = 6 \times 717 - 1$, but $11 \times 17 \times 23 \times 29 = 124729 = 6 \times 20788 + 1$.

If you want $6n - 1$ to have an even number of prime factors, at least one of them is going to have to be congruent to $1 \pmod 6$ rather than $-1 \pmod 6$. For example, $11 \times 17 \times 23 \times 31 = 133331$ $= 6 \times 22222 - 1$.

And so on and so forth. The bottom line is that you can take some of the primes you've already found and multiply them together and disprove your conjecture.

One last thing: you've forgotten about semiprimes divisible by 3, like 9, 21, 33, 39, 51, 57, etc.

0
On

It seems that the sequence of all integers $N$ that are either $6n+1$ or $6n-1$ are all primes if $N$ is neither divisible by $5$ nor semiprime.

Nor sphenic, nor the product of a prime times the square of another prime, nor the cube of a prime, nor the product of four distinct primes, nor the product of the square of a prime times the square of another prime, and so on and so forth for as long as you care to go.

It also seems that this sequence of primes includes all primes greater than $5$.

Yes, it does. Actually, if you allow $n = 0$, we get $6n - 1 = 5$. How do I insert a mind blown GIF on this thing?

There are infinitely many possibilities for $6n + k$, but to avoid duplicates, restrict $k$ to $0 \leq k < 6$. Also I get the feeling you're not too concerned with $n < 0$. Then if $k = 2$, $6n + k$ is always composite except when $n = 0$. Likewise $k = 4$ gives composites except for $n = -1$. And $k = 3$ gives composites except for $n = -1$ or $0$, because otherwise $6n + k$ is a nontrivial multiple of $3$.

That leaves us with $k = 1$ and $k = 5$. You might also find it useful to use $k = -1$ rather than $k = 5$.

Finally, it seems that the semiprimes thus removed from the original sequence constitute the sequence of all semiprimes having neither a factor of $2$ nor $5$.

You forgot about some multiples of $3$. I'm aware the others mentioned it already, but I'm going to lay it on really thick: a lot of multiples of $3$ are semiprimes. In fact, Neil Sloane has a listing that goes up to $674211$.

Is all this true?

Nope.

Thank you for your help, Rev20

And thank you for confirming charter schools are wonderfully terrible! Mwahahahahahahahahahahahaha!