This site is supported by donations to The OEIS Foundation.

# Least prime factor of n

### From OeisWiki

The **least prime factor** of an integer *n* is the smallest prime number that divides the number. For example, the least prime factor of 945 is 3. The least prime factor of all even numbers is 2. A prime number is its own least prime factor (as well as its own greatest prime factor).

By convention, 1 is given as its own least prime factor, but of course this has met with objections. By disallowing 1 as a prime number, we can then say that each prime number is its own least and greatest prime factor. However, in the OEIS, it is reasonable to believe that some users will look up the sequence of least prime factors as "1, 2, 3, 2, 5, 2, 7, 2, 3, 2" (give or take a few terms), and that should deliver a result.

## Sequences

Smallest prime dividing gives the sequence (Cf. A020639 Lpf(n): least prime dividing n, with .)

- {2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 19, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 59, 2, ...}