<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics}
\usepackage{latexsym}
\usepackage{epsf}
\usepackage{breakurl}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}

\newcommand{\seqnum}[1]{\href{https://oeis.org/#1}{\rm \underline{#1}}}

\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\begin{center}
\vskip 1cm{\Large\bf 
On Remarkable Properties of Primes \\
\vskip .1in
Near Factorials and Primorials
}
\vskip 1cm
Anton\'{\i}n \v Cejchan\\
Institute of Physics \\
Czech Academy of Sciences\\
Cukrovarnick\'a 112/10 \\
CZ -- 162 00 Prague 6 \\
Czech Republic\\
\href{mailto:antonin.cejchan@centrum.cz}{\tt antonin.cejchan@centrum.cz}\\
\ \\
Michal K\v r\'{\i}\v zek\\
Mathematical Institute \\
Czech Academy of Sciences\\
\v Zitn\' a 25 \\
CZ -- 115 67 Prague 1 \\
Czech Republic\\
\href{mailto:krizek@math.cas.cz}{\tt krizek@math.cas.cz}\\
\ \\
Lawrence Somer\\
Department of Mathematics \\
Catholic University of America\\
Washington, DC 20064 \\
USA\\
\href{mailto:somer@cua.edu}{\tt somer@cua.edu}
\end{center}

\vskip .2 in

\begin{abstract}
The distribution of primes is quite irregular. However,
it is conjectured that if $p$ is the smallest prime greater than $n!+1$, then $p-n!$
is also prime. We give a sufficient condition that guarantees
when this conjecture is true. In particular, we prove that
if a prime number $p$ satisfies $n!+1&lt;p&lt;n!+r^2$,
where $r$ is the smallest prime larger than a given natural
number $n$, then $p-n!$ is also a prime.
Similarly we treat another conjecture: 
If $p$ is the largest prime smaller than $n!-1$, then $n!-p$
is also prime. Then we establish further sufficient conditions 
also for the case when $n!$ is 
replaced by $q\#$, which is the product of all primes not exceeding the prime $q$.
\end{abstract}

\section{Primes near factorials}

Throughout this paper let $n\in\mathbb N$ be an arbitrary fixed natural number. 
Let $n!=1\cdot 2\cdots n$
be its factorial. 

Our main results are contained in Theorems \ref{T1},\ref{T2},\ref{T3}, and 
\ref{T4}.
First, we present two well-known lemmas
which illustrate that there are no primes in a close neighborhood above $n!+1$ and
below $n!-1$.

\begin{lemma} \label{L1}
If a prime $p&gt;n!+1$, then $p&gt;n!+n$.
\end{lemma}

\begin{proof} 
This lemma immediately follows from the fact that the consecutive numbers
$$
n!+2,~n!+3,\dots,~n!+n
$$
are all composite. 
\end{proof}

Similarly we can prove the second lemma.

\begin{lemma} \label{L2}
If a prime $p&lt;n!-1$ and $n&gt;3$, then $p&lt;n!-n$.
\end{lemma}

The assumption $n&gt;3$ excludes the undesirable initial case $n=p=3$ for which the inequality
$p&lt;n!-n$ is obviously not valid.



Recall \cite{A29} that primes of the form $n!+1$ are said to be {\it factorial primes.} 
For instance, if
$$
n=1,~2,~3,~11,~27,~37,~41,~73,~77,~116,~154,~320,~340,~399,~427,~872,\dots
$$
then $n!+1$ is prime. Primes of the form $n!-1$ are also called
{\it factorial primes.} We get them for
$$
n=3,~4,~6,~7,~12,~14,~30,~32,~33,~38,~94,~166,~324,~379,~469,~546,~974,\dots
$$
Now we present the first of our main theorems.

\begin{theorem} \label{T1}
Let $r$ be the smallest prime such that $r&gt;n$. If a prime $p$ satisfies
\begin{equation}
n!+1&lt;p&lt;n!+r^2,                                                             \label{1}
\end{equation}
then $p-n!$ is also prime.
\end{theorem}

\begin{proof}
The case $n=1$ is obvious. So let $n&gt;1$ and
let $p$ be a prime satisfying~(\ref{1}). Assume to the contrary 
that $p-n!$ is composite. Then there exist a prime $m$
and an integer $k\ge m$ such that
$$
p-n!=mk.                                                           
$$
From this and the inequality $p-n!&lt;r^2$ from (\ref{1}), we observe that $m&lt;r$ and therefore, 
the prime $m$ satisfies the inequality $m\leq n$. Since $m\mid n!$ and $m\mid (p-n!)$,
we find that $m\mid p$, which contradicts the assumption that $p$ is prime and the fact that
$p&gt;n!+1&gt;n\ge m$. 
\end{proof}

\begin{example} \label{E1} \rm
Let $n=5$. Then $r^2=49$ and for
consecutive primes after $5!$ we have
\begin{align}
5!=120&amp;=127-7=131-11=137-17=139-19=149-29   \nonumber \\[1mm]
      &amp;=151-31=157-37=163-43=167-47  \label{2} \\[1mm]
			&amp;=173-53=179-59=181-61=191-71=193-73=\underline{197-7\cdot 11}.   \nonumber
\end{align}
So all these differences of primes yield the same number $5!=120$.
We observe that there are even more consecutive primes $p&gt;n!+1$ than 
those satisfying (\ref{1}) for which $p-n!$ is also prime.
Namely, the inequality (\ref{1}) yields only the first two lines of (\ref{2}), but we can continue
in this manner until the underlined difference (cf.~Table \ref{N1} below for $n=5$).
\end{example}

\begin{theorem} \label{T2} 
Let $n&gt;2$ and let $s$ be the largest prime such that $s&lt;n$.
If a prime $p$ satisfies
\begin{equation}
n!-s^2&lt;p&lt;n!-1,                                                          \label{3}
\end{equation}
then $n!-p$ is also prime.
\end{theorem}

The proof is done similarly as in Theorem \ref{T1}. The additional 
assumption $n&gt;2$ only guarantees the existence of $s$.

\begin{example} \label{E2} \rm 
Take $n=7$ in Theorem \ref{T2}. Then $s^2=25$ and
\begin{align*}
7!&amp;=5040=5039+1=5023+17=5021+19\\[1mm]
  &amp;=5011+29=5009+31=5003+37=4999+41=4997+43\\[1mm]
  &amp;=4987+53=4973+67=4969+71=4967+73=4957+83\\[1mm]
  &amp;=4951+89=4943+97=4937+103=4933+107=4931+109=\underline{4919+11^2} .
\end{align*}
All these sums of primes yield the same number $7!=5040$.
We again get more consecutive primes $p$ 
than those satisfying (\ref{3}) for which $n!-p$ is prime
until the underlined sum, see the last two columns of Table \ref{N1} and Remark \ref{R2}.
Theorem \ref{T2} thus reminds us of the well-known Goldbach conjecture \cite[p.\,79]{A29}.
\end{example}






\section{Further examples and open problems}

In Figure \ref{F1}, we observe a remarkable distribution of primes near $n!$.
\begin{figure}[H]
\begin{center}
\scalebox{.8}{\vbox{
\hskip3cm$\,\vdots$

\hskip3cm$\bullet~n!+r^2$

\hskip3cm{\Large{$\biggl\{$}} Here for each prime $p$ we have that $p-n!$ is also prime by Theorem \ref{T1}.

\hskip3cm$\bullet~n!+n$

\hskip3cm$\Bigl\{$ There are no primes by Lemma \ref{L1}.

\hskip3cm$\bullet~n!+1$ A possible factorial prime.

\hskip3cm$\bullet~n!$ 

\hskip3cm$\bullet~n!-1$ A possible factorial prime.

\hskip3cm$\Bigl\{$ There are no primes by Lemma \ref{L2}.

\hskip3cm$\bullet~n!-n$

\hskip3cm{\Large{$\biggl\{$}} Here for each prime $p$ we have that $n!-p$ is also prime by Theorem~\ref{T2}.

\hskip3cm$\bullet~n!-s^2$

\hskip3cm$\,\vdots$

\hskip3cm$\bullet~3$

\hskip3cm$\bullet~2$

\hskip3cm$\bullet~1$
}}
\caption{Distribution of primes near $n!$ for $n&gt;2$.}                            \label{F1}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=5in]{Factoria.eps}
\end{center}
\caption{The number of consecutive primes $p$ just above $n!+1$ 
for which $p-n!$ is also prime for all $n\leq 486$.}                             \label{F2}
\end{figure}

It could happen, however, that the open intervals $(n!+1,n!+r^2)$
and $(n!-s^2,n!-1)$ appearing in (\ref{1}) and (\ref{3})
do not contain any prime number, although no such example is known.
Therefore, Theorems~\ref{T1} and \ref{T2} do not imply that the following 
conjectures are true.

\begin{conjecture} \label{C1}
If $p$ is the smallest prime greater than $n!+1$, then $p-n!$ is also prime.
\end{conjecture}

\begin{conjecture} \label{C2}
If $p$ is the largest prime smaller than $n!-1$, then $n!-p$ is also prime.
\end{conjecture}

\begin{remark} \label{R1} \rm
From the well-known Stirling formula \cite[p.\,343]{Rek}
$$
\lim_{n\to\infty}\frac{n!}{n^n{\rm e}^{-n}\sqrt{n}}=\sqrt{2\pi},
$$
we find an asymptotic expression for the factorial 
$n!\approx \sqrt{2\pi}\,n^n{\rm e}^{-n}\sqrt{n}$ and thus
$$
\ln(n!)\approx n\ln(n) - n +0.5\ln(n) +0.5\ln(2\pi).
$$
According to the celebrated Gauss prime number theorem \cite{A29}, 
the probability that $n$ is a prime number is about $1/\ln(n)$. Hence,
consecutive primes on the order of $n!$ should differ by about $\ln(n!)$
which is approximately
\begin{equation}
\ln(n!)=n\ln(n)-n+O(\ln(n))\qquad{\rm as~}n\to\infty,               \label{4}
\end{equation}
where $O(\cdot)$ stands for the usual Landau symbol. However, this is by 
relation (\ref{4}) much
less than $r^2\quad(&gt;n^2)$ appearing on the right-hand side of (\ref{1}). This
provides support that Conjecture \ref{C1} (and similarly Conjecture \ref{C2}) might be true.
\end{remark}

\begin{example} \label{E3} \rm
Another argument for the validity of Conjectures \ref{C1} and \ref{C2}
are numerical tests. The statements of Theorems \ref{T1} and \ref{T2} for $n=2,3,\dots,10$
are given in Table \ref{N1}.

\begin{table}
\begin{center}
\begin{tabular}{|r|r|r||c|r|} \hline
$n$ &amp; $N_1$ &amp; $N_2$ &amp; $N_3$ &amp; $N_4$\\ \hline
2 &amp; 2 &amp; 2 &amp;  $-$ &amp; $-$\\ 
3 &amp; 6 &amp; 6 &amp; 1 &amp; 1 \\ 
4 &amp; 6 &amp; 7 &amp;  2 &amp; 6 \\ 
5 &amp; 9 &amp; 14&amp;  1 &amp; 10\\
6 &amp; 7 &amp; 7 &amp;  2 &amp; 10\\
7 &amp; 12 &amp; 17&amp; 2 &amp; 17\\
8 &amp; 8 &amp; 15&amp;  3 &amp; 10\\
9 &amp; 11 &amp; 18&amp; 3 &amp; 4\\
10&amp; 7 &amp; 11&amp;  5 &amp; 8\\ \hline
\end{tabular}
\end{center}
\caption{Here 
$N_1$ denotes the number of primes satisfying (\ref{1}), 
$N_2$ is the number of consecutive primes just above $n!+1$ for which $p-n!$ is prime,
$N_3$ is the number of primes satisfying (\ref{3}), 
$N_4$ is the number of consecutive primes just below $n!-1$ for which $n!-p$ is prime,
$N_1\leq N_2$, and $N_3\leq N_4$.}                                                  \label{N1}
\end{table}
\end{example}

Numerical tests calculated by Maple for all $n\leq 500$
indicate that if $\overline p$ is
the smallest prime greater than $n!+1$ for which 
$\overline{p}-n!$ is composite, then $\overline{p}-n!$
is always the product of two not necessarily different primes,
cf.~Tab\-le~2. In Figure \ref{F2}, we see an increasing trend of the number of consecutive primes $p$
above $n!+1$ for which $p-n!$ is also prime.
\begin{table}
\begin{center}
\begin{tabular}{|r|r|r|l|} \hline
$n$ &amp; $N_1$ &amp; $N_2$ &amp; $\overline{p}-n!$ \\ \hline
 10 &amp; 7  &amp; 11 &amp; $169=13^2$ \\ 
 50 &amp; 27 &amp; 34 &amp; $3481=59^2$ \\ 
100 &amp; 30 &amp; 30 &amp; $10201=101^2$  \\
150 &amp; 37 &amp; 48 &amp; $31133=163\cdot 191$  \\
200 &amp; 54 &amp; 89 &amp; $76729=277^2$ \\
250 &amp; 55 &amp; 79 &amp; $88579=283\cdot 313$ \\
300 &amp; 77 &amp;121 &amp; $176959=311\cdot 569$ \\ 
350 &amp; 76 &amp; 76 &amp; $124609=353^2$ \\
400 &amp; 85 &amp;122 &amp; $242321=443\cdot 547$  \\
450 &amp; 95 &amp;133 &amp; $307297=487\cdot 631$ \\
500 &amp; 95 &amp;105 &amp; $294319=521\cdot 569$ \\  \hline
\end{tabular}
\end{center}

\caption{Here $N_1$ denotes the number of primes satisfying (\ref{1}),
$N_2$ is the number of consecutive primes just above $n!+1$ for which $p-n!$ is also prime,
and $\overline p$ is the smallest prime greater than $n!+1$ for which $\overline{p}-n!$ is composite.}  \label{N2}
\end{table}

Another open problem is whether the difference $\overline p-n!$ from the last column
of Table \ref{N2} is always the product of two (not necessarily different) primes that
are greater than $n$.

\begin{remark} \label{R2} \rm 
If the upper bound $n!+r^2$ appearing in $(\ref{1})$ is a prime $\tilde p$, then 
$N_1=N_2$ in Table~\ref{N1}, since the difference $\tilde p -n!=(n!+r^2)-n!=r^2$ is composite.
Hence, the sequence of consecutive primes $p$ just above $n!+1$,
for which $p-n!$ is also prime, finishes before
$n!+r^2$. For instance, $2!+3^2=11$, $3!+5^2=31$, and $6!+7^2=769$ are primes, cf. Table \ref{N1}
for $n\in\{2,3,6\}$.
Also $100!+101^2$ and $350!+353^2$ are primes, cf.~Table \ref{N2} for $n\in\{100, 350\}$.

On the other hand, the lower bound $n!-s^2$ appearing in (\ref{3}) is never
prime except for the trivial case $n=3$ when $N_3=N_4=1$.
The reason is that $s\mid n!$, and thus $s\mid (n!-s^2)$. 
\end{remark}

\begin{remark} \label{R3} \rm
The verification of Conjecture \ref{C1} for any $n\leq 4003$ follows from 
sequence \seqnum{A037153}
in the {\it On-Line Encyclopedia of Integer Sequences} (OEIS)
\cite{www}. Also see sequences \seqnum{A033932}, 
\seqnum{A037151}, and \seqnum{A087421}.
The verification of Conjecture \ref{C2} for $n\leq 1000$ follows from
\seqnum{A037155}. Conjectures \ref{C1} and \ref{C2} are also related to
a paper by Fl\'orez and James \cite{Florez}.
Nevertheless, one has to keep in mind the so-called strong law of small numbers
\cite{Gardner1, Gardner2, Guy5, Guy6, Guy}, when the validity of some apparent regular pattern
is violated for $n\gg 1$.
\end{remark}

Now we will modify our previous results to another class of numbers.







\section{Primes near primorials}

From now on, let $q$ be an arbitrary fixed prime.
Denote by $q\#$ the product of all primes not exceeding $q$,
i.e., $q\#=2\cdot 3\cdot 5\cdots q$.
It is called the {\it primorial} of $q$.

\begin{conjecture} \label{C3}
If $p$ is the smallest prime greater than $q\#+1$, then $p-q\#$ is also prime.
\end{conjecture}

\begin{conjecture} \label{C4}
If $p$ is the largest prime smaller than $q\#-1$, then $q\#-p$ is also prime.
\end{conjecture}

The classical proof of Euclid's theorem on the infinity of primes is
done by contradiction \cite{A29}. It is assumed that there exist
only a finite number of primes and that the largest prime is $q$.
Then one investigates the number $q\#+1$ which leads to a contradiction,
since $q\#+1$ is a new prime or $q\#+1$ is composite and divisible
by a prime greater than $q$. 
For this reason, prime numbers of the form $q\#+1$ are called 
\it Euclidean primes, \rm see e.g.,\cite{B60}. For example,
$$
2\#+1=3,\quad 3\#+1=7,\quad 5\#+1=31,\quad 7\#+1=211,\quad 11\#+1=2311
$$
are Euclidean primes. However, 
not every number of this form is prime, since
$$
13\#+1 = 2\cdot 3\cdot 5\cdot 7 \cdot 11 \cdot 13 + 1 =59\cdot  509.
$$
Note that $q\#+1$ is a Euclidean prime only for
$$
q=2,~3,~5,~7,~11,~31,~379,\dots
$$

Similarly we can investigate
numbers of the form $q\#-1$, which are primes for
$$
q=3,~5,~11,~13,~41,~89,~317,~337,~991,\dots
$$
In this case they are called {\it primorial primes}. 

\begin{lemma} \label{L3}
If a prime $p&gt;q\#+1$, then $p&gt;q\#+q$.
\end{lemma}

\begin{proof}
Since the consecutive numbers
$$
q\#+2,~q\#+3,\dots,~q\#+q
$$
are all composite, the lemma follows.
\end{proof}

\smallskip

Similarly we can prove the next lemma.

\begin{lemma} \label{L4} 
If a prime $p&lt;q\#-1$ and $q&gt;3$, then $p&lt;q\#-q$.
\end{lemma}

\begin{theorem} \label{T3} 
Let $q&lt;r$ be consecutive primes. If a prime $p$ satisfies
\begin{equation}
q\#+1&lt;p&lt;q\#+r^2,                                        \label{5}
\end{equation}
then $p-q\#$ is also prime.
\end{theorem}

\begin{proof}
We shall proceed similarly as in the proof of Theorem \ref{T1}.
Let $p$ be a prime satisfying (\ref{5}).
Suppose to the contrary that $p-q\#$ is composite. Then there exist a prime $m$
and an integer $k\ge m$ such that
\begin{equation}
p-q\#=mk.                                               \label{6}
\end{equation}
From this
and the inequality $p-q\#&lt;r^2$ arising from (\ref{5}), we see that $mk&lt;r^2$
and thus $m\leq q&lt;r$.
Since $m\mid q\#$ and $m\mid (p-q\#)$ by (\ref{6}),
we find that $m\mid p$ which is a contradiction with the assumption
that $p$ is prime and the fact that $p&gt;q\#+1&gt;q\ge m$.
\end{proof}

In a similar way we can prove the following statement.

\begin{theorem} \label{T4} 
Let $s&lt;q$ be consecutive primes. If a prime $p$ satisfies
\begin{equation}
q\#-s^2&lt;p&lt;q\#-1,                                         \label{7}                                     
\end{equation}
then $q\#-p$ is also prime.
\end{theorem}

\begin{example} \label{E4} \rm
To illustrate the meaning of Lemmas \ref{L3} and \ref{L4} and also Theorems \ref{T3} and \ref{T4}, we 
set $q=13$. We observe similar remarkable properties of consecutive 
primes near $q\#\pm 1$ as in Examples \ref{E1} and \ref{E2}, namely, 
\begin{align*}
13\#&amp;=30030=30047-17=30059-29=30071-41=30089-59=30091-61\\
    &amp;=30097-67=30103-73=30109-79=30113-83=30119-89\\
		&amp;=30133-103=30137-107=30139-109=30161-131=30169-139\\
		&amp;=30181-151=30187-157=30197-167=30203-173=30211-181\\
		&amp;=30223-193=30241-211=30253-223=30259-229=30269-239\\
		&amp;=30271-241=30293-263=30307-277=30313-283=\underline{30319-17^2},
\end{align*}
\begin{align*}
13\#&amp;=30030=30029+1=30013+17=30011+19=29989+41=29983+47\\
    &amp;=29959+71=29947+83=29927+103=29921+109=29917+113\\
		&amp;=29881+149=29879+151=29873+157=29867+163=29863+167\\
		&amp;=29851+179=29837+193=29833+197=29819+211=29803+227\\
		&amp;=29789+241=29761+269=29759+271=29753+277=\underline{29741+17^2}.
\end{align*}
\end{example}

Figure \ref{F1} can be easily modified to primes near $q\#$. 
Also Table \ref{N3} corresponding to these primes is similar to Table \ref{N1}.

\begin{table}
\begin{center}
\begin{tabular}{|r|r|r||r|r|} \hline
$n$ &amp; $Q_1$ &amp; $Q_2$ &amp; $Q_3$ &amp; $Q_4$\\ \hline
2 &amp; 2 &amp; 2 &amp; $-$&amp; $-$\\
3 &amp; 6 &amp; 6 &amp; 1 &amp; 1\\
5 &amp; 10 &amp; 10 &amp; 1 &amp; 6\\
7 &amp; 19 &amp; 19&amp;  4 &amp; 22\\
11&amp; 23 &amp; 25&amp;  7 &amp; 19\\
13&amp; 29 &amp; 29&amp;  9 &amp; 23\\
17&amp; 25 &amp; 36&amp; 10 &amp; 33\\
19&amp; 38 &amp; 42&amp; 20 &amp; 32\\  \hline
\end{tabular}
\end{center}
\caption{Here 
$Q_1$ denotes the number of primes satisfying (\ref{5}), 
$Q_2$ is the number of consecutive primes just above $q\#+1$ for which $p-q\#$ is prime,
$Q_3$ is the number of primes satisfying (\ref{7}), 
$Q_4$ is the number of consecutive primes just below $q\#-1$ for which $q\#-p$ is prime,
where $q&gt;2$, $Q_1\leq Q_2$, and $Q_3\leq Q_4$.}                                         \label{N3}
\end{table}

Taking into account that
$$
4!&lt;5\#&lt;5!&lt;7\#&lt;6!&lt;11\#&lt;7!&lt;13\#&lt;8!&lt;17\#&lt;9!&lt;10!&lt;19\#,
$$
we find that
numbers $Q_i$ in particular columns are generally greater than $N_i$ from Table \ref{N1}.
when $(n-1)!&lt; q\#&lt;n!$.

\begin{remark} \label{R4} \rm
If the upper bound $q\#+r^2$ appearing in $(\ref{5})$ is a prime $\tilde p$, then 
$Q_1=Q_2$ in Table \ref{N3}, since the difference $\tilde p -q\#=(q\#+r^2)-q\#=r^2$ is composite.
Hence, the sequence of consecutive primes $p$ just above $q\#+1$,
for which $p-q\#$ is also prime, finishes before
$q\#+r^2$. For instance, $2\#+3^2=11$, $3\#+5^2=31$, $5\#+7^2=79$, $7\#+11^2=331$,
and $13\#+17^2=30319$ are primes, cf. Table \ref{N3} for $q\in\{2,3,5,7,13\}$.

On the other hand, the lower bound $q\#-s^2$ appearing in (\ref{7}) is never
prime except for the trivial case $q=3$ when $Q_3=Q_4=1$.
The reason is that $s\mid q\#$, and thus $s\mid (q\#-s^2)$.
\end{remark}

\begin{remark} \label{R5} \rm
We note that a Fortunate number, named after Reo Franklin Fortune, is the smallest
integer $m&gt;1$ such that for a given prime $q$, $q\#+m$ is a prime number
(see \cite{Gardner1, Gardner2, Golomb, Guy5, Guy} for a discussion of Fortunate numbers). The sequence of Fortunate numbers begins: 
3, 5, 7, 13, 23, 17, 19, 23, 37, \dots Conjecture \ref{C3} which was introduced by 
Fortune, states that all Fortunate numbers are primes. The verification of Conjecture \ref{C3}
for the first 3000 primes $q$ follows from \seqnum{A005235} (also see
\seqnum{A046066}, \seqnum{A035346}, \seqnum{A098168}).
The verification of Conjecture \ref{C4}
for the first 2000 primes $q$ follows from \seqnum{A055211} (also see
\seqnum{A098166}).
\end{remark}

\begin{remark} \label{R6} \rm
The distribution of primes is quite irregular. However, Theorems \ref{T1}--\ref{T4}
imply that there are some regular patterns. Moreover,
Theorems \ref{T3} and \ref{T4} can be easily extended to the case when $q\#$ is everywhere 
substituted by the product $i(q\#)$ for any fixed integer $i\in\mathbb N$. For example,
for $i=31$ and $q=3$ we have $31\cdot 6=186=191-5=193-7=197-11=199-13=\underline{211-5^2}$.

This extension covers the case investigated in Section 1, since we may set $i=n!/q\#$
for some $n\ge q$. See, for example, identities (\ref{2}) for $n=q=5$ yielding $i=120/30=4$.
\end{remark}




\section{Acknowledgments}
The authors are indebted to 
Jan Brandts for fruitful suggestions,
Hana B\'{\i}lkov\'a for technical assistance in the final typesetting, and to
Filip K\v r\'{\i}\v zek for drawing Figure \ref{F2}.
Supported by RVO 67985840 of the Czech Republic. The authors also thank the
anonymous referee for careful reading of the paper and suggestions which improved the paper.

\begin{thebibliography}{99}

\bibitem{Florez}
R. Fl\'orez and L. Junes,
A relation between triangular numbers and prime numbers,
{\it Integers} {\bf 12} (2012), 83--96.

\bibitem{Gardner1}
M. Gardner,
Patterns in primes are a clue to the strong law of small numbers,
{\it Sci. Amer.} {\bf 243} (6) (1980), 18--28.

\bibitem{Gardner2}
M. Gardner,
{\it The Last Recreations},
Copernicus, 1997.

\bibitem{Golomb}
S. W. Golomb,
The evidence for Fortune's conjecture.
{\it Math. Mag.} {\bf 54} (1981), 209--210.

\bibitem{Guy5}
R. K. Guy,
The strong law of small numbers, 
{\it Amer. Math. Monthly} {\bf 95} (1988), 697--712.

\bibitem{Guy6}
R. K. Guy,
The second strong law of small numbers,
{\it Math. Mag.} {\bf 63} (1990), 3--20.

\bibitem{Guy}
R. K. Guy, 
{\it Unsolved Problems in Number Theory}, 3rd edition,
Springer-Verlag, 2004.

\bibitem{B60} 
M. K\v r\'{\i}\v zek and L. Somer,
Euclidean primes have the minimum number of primitive roots,
{\it JP J. Algebra Number Theory Appl.} {\bf 12} (2008), 121--127.

\bibitem{A29} 
M. K\v r\'{\i}\v{z}ek, L. Somer, and A. \v Solcov\'a,
{\it From Great Discoveries in Number Theory to Applications},
Springer, 2021.

\bibitem{Rek}
K. Rektorys,
{\it Survey of Applicable Mathematics}, Vol.~1, Kluwer Acad. Publ. Group, 1994.

\bibitem{www}  N. J. A. Sloane et al.,
{\it The On-Line Encyclopedia of Integer Sequences}, 
available at \url{https://oeis.org}, 2022.

\end{thebibliography}



\bigskip
\hrule
\bigskip

\noindent 2010 {\it Mathematics Subject Classification}:
Primary 11A41; Secondary 11N05.

\noindent \emph{Keywords: } 
factorial prime, Euclidean prime, primorial prime, Fortunate number,
Stirling formula, Gauss prime number theorem.


\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A005235},
\seqnum{A033932},
\seqnum{A035346},
\seqnum{A037151},
\seqnum{A037153},
\seqnum{A037155},
\seqnum{A046066},
\seqnum{A055211},
\seqnum{A087421},
\seqnum{A098166}, and
\seqnum{A098168}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received November 11 2021; 
revised version received  January 3 2022; January 10 2022.
Published in {\it Journal of Integer Sequences}, January 10 2022.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{https://cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in


\end{document}

</pre></body></html>