In number theory, a polite number is a positive integer that can be written as the sum of two or more consecutive positive integers. Other positive integers are impolite. Polite numbers have also been called staircase numbers because the Young diagrams representing graphically the partitions of a polite number into consecutive integers resemble staircases. If all numbers in the sum are strictly greater than one, the numbers so formed are also called trapezoidal numbers because they represent patterns of points arranged in a trapezoid. The problem of representing numbers as sums of consecutive integers and of counting the number of representations of this type has been studied by Sylvester, Mason, Leveque, and many other more recent authors.
The politeness of a positive number is defined as the number of ways it can be expressed as the sum of consecutive integers. For every x, the politeness of x equals the number of odd divisors of x that are greater than one. The politeness of the numbers 1, 2, 3,... is For instance, the politeness of 9 is 2 because it has two odd divisors, 3 and itself, and two polite representations the politeness of 15 is 3 because it has three odd divisors, 3, 5, and 15, and three polite representations An easy way of calculating the politeness of a positive number is that of decomposing the number into its prime factors, taking the powers of all prime factors greater than 2, adding 1 to all of them, multiplying the numbers thus obtained with each other and subtracting 1. For instance 90 has politeness 5 because ; the powers of 3 and 5 are respectively 2 and 1, and applying this method.
Construction of polite representations from odd divisors
To see the connection between odd divisors and polite representations, suppose a number x has the odd divisory > 1. Then y consecutive integers centered on x/y have x as their sum: Some of the terms in this sum may be zero or negative. However, if a term is zero it can be omitted and any negative terms may be used to cancel positive ones, leading to a polite representation for x. For instance, the polite number x = 14 has a single nontrivial odd divisor, 7. It is therefore the sum of 7 consecutive numbers centered at 14/7 = 2: The first term, −1, cancels a later +1, and the second term, zero, can be omitted, leading to the polite representation Conversely, every polite representation of x can be formed from this construction. If a representation has an odd number of terms, x/y is the middle term, while if it has an even number of terms and its minimum value is m it may be extended in a unique way to a longer sequence with the same sum and an odd number of terms, by including the 2m − 1 numbers −, −,..., −1, 0, 1,..., m − 2, m − 1. After this extension, again, x/y is the middle term. By this construction, the polite representations of a number and its odd divisors greater than one may be placed into a one-to-one correspondence, giving a bijective proof of the characterization of polite numbers and politeness. More generally, the same idea gives a two-to-one correspondence between, on the one hand, representations as a sum of consecutive integers and on the other hand odd divisors. Another generalization of this result states that, for any n, the number of partitions of n into odd numbers having k distinct values equals the number of partitions of n into distinct numbers having k maximal runs of consecutive numbers. Here a run is one or more consecutive values such that the next larger and the next smaller consecutive values are not part of the partition; for instance the partition 10 = 1 + 4 + 5 has two runs, 1 and 4 + 5. A polite representation has a single run, and a partition with one value d is equivalent to a factorization of n as the product d ⋅, so the special casek = 1 of this result states again the equivalence between polite representations and odd factors.
Trapezoidal numbers
If a polite representation starts with 1, the number so represented is a triangular number More generally, it is the difference of two nonconsecutive triangular numbers In either case, it is called a trapezoidal number. That is, the polite numbers are simply trapezoidal numbers. One can also consider polite numbers whose only polite representations start with 1. The only such numbers are the triangular numbers with only one nontrivial odd divisor, because for those numbers, according to the bijection described earlier, the odd divisor corresponds to the triangular representation and there can be no other polite representations. Thus, polite numbers whose only polite representation starts with 1 must have the form of a power of twomultiplied by an odd prime. As Jones and Lord observe, there are exactly two types of triangular numbers with this form:
the even perfect numbers 2n − 1 formed by the product of a Mersenne prime 2n − 1 with half the nearest power of two, and
the products 2n − 1 of a Fermat prime 2n + 1 with half the nearest power of two.
. For instance, the perfect number 28 = 23 − 1 and the number 136 = 24 − 1 are both this type of polite number. It is conjectured that there are infinitely many Mersenne primes, in which case there are also infinitely many polite numbers of this type.