The least nondivisor of a positive integer is the smallest positive
integer that does not divide
. Writing this number as
gives
|
(1)
|
For ,
2, ..., its values begin 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, ... (OEIS A007978).
In particular,
for odd
and
for even
.
The possible values are exactly the prime powers with
. If
had two distinct prime factors,
each of its maximal prime power factors would be smaller
than
and would divide
. Their product would then divide
, contrary to the definition. Conversely,
the first occurrence of a prime power
is at
|
(2)
|
since this least common multiple is divisible by every smaller positive integer but has exponent
at
(OEIS A007978).
Put
for
and
.
The exact distribution follows from
|
(3)
|
so the number of positive integers with
is
, where
denotes the floor function.
Consequently, the natural density of the set with
is
|
(4)
|
This is positive precisely when is a prime power. Farhi (2009,
p. 556) proved the average-order formula
|
(5)
|
More generally, the th
least nondivisor is the
th smallest positive integer
that does not divide
. The second least nondivisors begin 3, 4, 4, 5, 3, 5, 3, 5,
4, 4, ... (OEIS A396771). Their possible values
are the integers
that are either a prime power
or twice a prime power (Radcliffe 2026). Indeed, if
but
, then every multiple
of
through
fails to divide
. There can be at most two such multiples
when
is the second least nondivisor, forcing
.