The Smarandache near-to-primorial function is the smallest prime
such that
,
, or
is divisible by the positive
integer
, where
is the primorial of
. The value
exists iff one of the following
conditions holds (Ashbacher 1996):
1. is squarefree.
2. is not squarefree and there
exists a prime
such that
, where
is the least prime factor
of
.
For example, is undefined at
, 8, 9, 12, 16, 18, 20, 24, 25, 27, and 28, the initial squareful numbers (OEIS A013929),
since none satisfies the second condition. For the squarefree
arguments
, 2, 3, 5, 6, 7, 10, 11, ..., the first few values of
are 2, 2, 2, 3, 3, 3, 5, 7, ... (OEIS A046026).