88 percent of all integers have a factor under 100

And 92 percent of all (positive) integers have a factor under 1,000. And how many have a factor under 6? Can you guess the answer? Read more to find out.

Clearly, the vast majority of big numbers have small factors. Also, the chance to be a prime becomes incredibly small, the bigger the number. I stumbled upon these problems when looking for new algorithms to factor a product of two large primes (more on this coming soon.) I then decided to find out what the proportion of integers having a factor under n, is.

To answer this question, let first define p(m) as the proportion of integers that are divisible by one (or more) of the first m prime numbers. One can easily show that where the product is over the first m prime numbers. In particular, the proportion of integers with a factor under 6 is p(3) = 1 – (1 – 1/2)(1 – 1/3) (1 – 1/5) = 73%. The above mathematical formula can easily be derived, using arguments similar to those in my article A Beautiful Probability Theorem.

To answer the more general question about the proportion of integers having a factor under n, one must choose m such that the last prime in the above product is the largest prime number smaller than n. Using the prime number theorem, it is easy to get an approximation for m as n tends to infinity. Also, taking the logarithm of the product, one can finally answer the question using approximations based on the prime number theorem. I will leave it to the reader to find the asymptotic formula and post it here in the comment section below.

Using the exact formula for p(m), it is also easy to built a table:for the proportion p(n) of positive integers with a factor under n, see table below: Other Problems Involving Factoring

Here, by divisor, I mean a non-trivial divisor. For instance, the largest divisor of 45 is 15, not 45. Study the following recurrence relationships:

• f(n+1) is the largest prime factor of 3 f(n) + 1, with f(1) = 1.
• Same if f(n+1) is defined as the largest prime factor of 2 f(n) + 5, with f(1) = 1.

Are all these functions turning periodic, beyond some n?