Generate arbitrarily long sequences of consecutive numbers without primes.

chinese remainder theoremelementary-number-theoryprime numbers

Recently learned about this formula to generate consecutive composite numbers

$n!+2,n!+3,…,n!+n$

The goal of this question is to find if other methods exist to generate arbitrarily long sequences of consecutive numbers without primes.

I started searching for other formulas and stumbled upon this Theorem 2.1

For every $n \in \mathbb{N}$, there exists disjoint sets $A_{1}$ and $A_{2}$
each containing $n$ consecutive natural numbers such that $gcd(a_{1},a_{2}) > 1$ whenever $a_{i} \in A_{i}$.

If I understand it correctly, it says there are $n \times n$ hidden square forests within the integer lattice $\mathbb{Z}^{2}$ in the plane.

For example, let $n=2$, so there's a $2 \times 2$ hidden forest with consecutive composite numbers

$174,175$

and

$20,21$

hidden_forest

For $n=4$, consecutive composites are

$2847617195518191809+1,2847617195518191809+2,…$

and

$1160906121308397397+1,1160906121308397397+2,…$

Question

Can those hidden consecutive points have a prime coordinate? If true, then this idea isn't valid.

If false (hurray!), is it possible to simplify the Theorem to focus on generating arbitrarily long sequences $n$ of consecutive numbers without primes?

The proof involves linear congruences and the Chinese Remainder Theorem which are far beyond my maths skills.

EDIT

Based upon the answers so far, this sums it up best for me

This, of course, is impractically complicated in the context of the
fact that you can simply generate $\{m! + k\}_{k=2}^{m}$ for $m = n^2+1$

It's a solution but is extremely computationally intractable.

For example, to generate $3$ consecutive composites, define a prime matrix

\begin{equation*}
P_{3,3} =
\begin{pmatrix}
2 & 3 & 5 \\
7 & 11 & 13 \\
17 & 19 & 23
\end{pmatrix}
\end{equation*}

The corresponding linear congruences we need to solve are

$x+1 \equiv 0 \bmod (2\times3\times5 = 30)$
$x+2 \equiv 0 \bmod (7\times11\times13 = 1001)$
$x+3 \equiv 0 \bmod (17\times19\times23 = 7429)$

By the Chinese Remainder Theorem, the unique solution is

$x = 119740619 \pmod{223092870}$

Thus, the $3$ composites are

$\Large 119740620,119740621,119740622$

Maybe other prime matrix variations work too or can be reduced to the standard Primorial.

Thanks!

Best Answer

By construction, the sets $A_1, A_2$ comprise disjoint runs of consecutive numbers, none of which can be prime because of the congruences at the top of page 7.

There is no purpose to using this theorem to generate arbitrarily long strings of consecutive composite numbers, because you already have a way to do it explicitly: $$\{n! + k\}_{k=2}^n$$ are all composite. The sets $A_1, A_2$ are disjoint and in general will not be consecutive with respect to each other; and within each set, the elements are indeed consecutive and composite, but their length is only $n$, rather than the full $2n$ from the union $A_1 \cup A_2$. In fact, I think the way you asked this part of your question indicates a fundamental misunderstanding on your part. While there are indeed $n^2$ lattice points in such a square, those are points with separate horizontal and vertical coordinates. To get a scalar out of these points, you'd need to apply some kind of one-to-one function, say $f : \mathbb Z \times \mathbb Z \to \mathbb Z$ that preserves compositeness in the sense that if $a, b$ are composite, then $f(a,b)$ is also composite; moreover, it would also need to map the square into a set of consecutive composite numbers. This, of course, is impractically complicated in the context of the fact that you can simply generate $\{m! + k\}_{k=2}^{m}$ for $m > n^2+1$.