# How many factors a number has

I've been wondering how just adding 1 to a number effects the number of factors. 12 has 6 factors (quite a lot) but 13 is prime ( I think of 12 as being a sort of factor unstability). On the other hand 14 'resists' change because it has the same number of factors as 15. 23 is prime but 24 has lots of factors as if there is something about 23 that allows the number of factors to dramatically increase. Clearly the number of factors can increase an uncreasing instability or decrease a decreasing stability or resisting stability. I'd like to know what the proportion of each type of number is. Are there equal numbers of stable and unstable or not? What,s the most consequtive stable numbers it is possible to have? It's just interest nothing more. Karl

• You can't really state that there are "equal number of stable and unstable" in a generic manner, you have to specify in what sense : the natural way to say this would be that the ratio of unstable numbers over stable numbers for numbers going from $1$ to $n$ goes to $1$ as $n \to \infty$. I believe this kind of study of number of factors is highly non-trivial, and it could be studied probably in a more efficient way if you defined explicitly how you want "stability" to be defined, because there is not only one way to do that. – Patrick Da Silva Aug 9 '11 at 20:32
• In his response to this question: math.stackexchange.com/questions/2694/… Greg Muller suggests the real question is "In what ways does the prime factorization of a affect the prime factorization of a+1?" and basically concludes (if I may be permitted an extreme summary) not at all. I recommend his answer. – Ross Millikan Aug 9 '11 at 20:36
• @Ross There seems to be a relationship of sorts between the factors of $a$ and $a + 1$. See my answer to this question. math.stackexchange.com/questions/49657/… – Jay Aug 9 '11 at 23:01

Not much has been proved about the connection between the numbers of divisors of consecutive integers. There can be dramatic drops and rises, because of the primes, but not much else is known.

One partial exception has to do with numbers that, in your terminology, resist change.

Let $d(n)$ be the number of divisors of $n$. Heath-Brown proved that there are infinitely many integers $n$ such that $d(n)=d(n+1)$. Thus there are infinitely many $n$ that resist change. Later, Pinner proved that for any positive integer $B$, there are infinitely many integers $n$ such that $d(n)=d(n+B)$. Heath-Brown gives an asymptotic estimate that shows that the phenomenon is in fact not very rare.

Please follow this link for a survey of properties of the divisor function $d(n)$. You can find the paper by Pinner here. It is now known that for any positive integer $a$, there are infinitely many $n$ such that $d(n)=d(n+1)=24a$.

There has been work, mainly computational, on sequences of more than two consecutive integers that all have the same number of divisors. Edit: Please see the comments of @Gerry Myerson below.

It is still an open question whether there are infinitely many $n$ such that $d(n)=d(n+1)=d(n+2)$.

The proofs of the results of Heath-Brown and Pinner are difficult. There is a University of Waterloo Master's thesis by Pechenick that gives a less condensed proof of the result of Heath-Brown, and mentions and/or proves a number of other related results, for example about the number of prime divisors of consecutive integers.

• According to Guy, Unsolved Problems In Number Theory, Problem B18, in 1990 Ivo Duntsch and Roger Eggleton discovered a sequence of 9 consecutive numbers, each with 48 divisors, starting with 17796126877482329126044. – Gerry Myerson Aug 9 '11 at 23:57
• And in 2006, Bilgin Ali and Bruno Mishutka found sequences of lengths 10, 11, and 12. The last starts with 1284696910355238430481207644, each number has 24 divisors. See listserv.nodak.edu/cgi-bin/… See also oeis.org/A006558 – Gerry Myerson Aug 10 '11 at 0:06
• @Gerry Myerson: Thanks. I am very out of date. – André Nicolas Aug 10 '11 at 0:45

It's extremely erratic.

When you add 1 to a number, you replace the set of its prime factors with a different, non-overlapping set of prime factors; the two numbers cannot have any prime factors in common.

For example:

$901 = 17 \times 53$

$902 = 2\times 11\times 41$.

So 901 has four factors: $1,\ \ 17,\ \ 53,\ \ 17\times53$.

902 has eight factors $2,\ \ 11,\ \ 41,\ \ 2\times 11,\ \ 2\times 41,\ \ 11\times 41,\ \ 2\times11\times 41$.

The fact that the two sets of prime factors are always completely disjoint from each other makes the problem non-trivial.

(The fact that the two sets of prime factors are always completely disjoint from each other is also basic to proving that there actually are infinitely many prime numbers.)

The Online Encyclopedia of Integer Sequences has this entry: http://oeis.org/A000005

• Thanks. It's just interesting that 301 302 303 all have the same number of factors but 304 has more. Thought there might be a limit as to how many numbers all had the same. – Karl Aug 9 '11 at 20:57
• I see that I omitted "1" from the list of factors of 902; I said it has eight and listed seven. – Michael Hardy Aug 9 '11 at 21:12
• oeis.org/A005237 – Charles Aug 10 '11 at 13:46

You might find reading something on "highly composite numbers" such as here or here. Perhaps also of interest, it's not all too hard to find a sequence of composite numbers as long as you like say of length n-1. Just pick a number n, and consider n!. Then your sequence goes n!-2, n!-3, ..., n!-n.