Let be any integer and let (also denoted ) be the least integer greater than 1 that divides , i.e., the number in the factorization
with for . The least prime factor is implemented in the Wolfram Language as FactorInteger[n][[1,1]].
For , 3, ..., the first few are 2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, ... (OEIS A020639).
If is composite then (Séroul 2000, p. 7), with equality for the square of a prime.
A plot of the least prime factor function resembles a jagged terrain of mountains, which leads to the appellation of "twin peaks" to a pair of integers such that
1. ,
2. ,
3. For all , implies .
The least multiple prime factors for squareful integers are 2, 2, 3, 2, 2, 3, 2, 2, 5, 3, 2, 2, 2, ... (OEIS A046027).
Erdős et al. (1993) consider the least prime factor of the binomial coefficients, and define what they term good binomial coefficients and exceptional binomial coefficients. They also conjecture that