In number theory, a polite number is a positive integer that can be written as the sum of two or more consecutive positive integers. A positive integer which is not polite is called impolite. The impolite numbers are exactly the powers of two, and the polite numbers are the natural numbers that are not powers of two. Polite numbers have also been called staircase numbers because the Young diagrams which represent graphically the partitions of a polite number into consecutive integers (in the French notation of drawing these diagrams) 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 polite numbers describe the possible numbers of sides of the Reinhardt polygons.
Examples and characterization The first few polite numbers are
3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, ... (sequence A138591 in the OEIS). The impolite numbers are exactly the powers of two. It follows from the Lambek–Moser theorem that the nth polite number is f(n + 1), where
f ( n ) = n + ⌊ log 2 ( n + log 2 n ) ⌋ . {\displaystyle f(n)=n+\left\lfloor \log _{2}\left(n+\log _{2}n\right)\right\rfloor .}
Politeness 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
0, 0, 1, 0, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 3, 0, 1, 2, 1, 1, 3, ... (sequence A069283 in the OEIS). For instance, the politeness of 9 is 2 because it has two odd divisors, 3 and 9, and two polite representations
9 = 2 + 3 + 4 = 4 + 5; the politeness of 15 is 3 because it has three odd divisors, 3, 5, and 15, and (as is familiar to cribbage players) three polite representations
15 = 4 + 5 + 6 = 1 + 2 + 3 + 4 + 5 = 7 + 8. An easy way of calculating the politeness of a positive number by 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 90 = 2 × 3 2 × 5 1 {\displaystyle 90=2\times 3^{2}\times 5^{1}} ; the powers of 3 and 5 are respectively 2 and 1, and applying this method ( 2 + 1 ) × ( 1 + 1 ) − 1 = 5 {\displaystyle (2+1)\times (1+1)-1=5} .
Construction of polite representations from odd divisors To see the connection between odd divisors and polite representations, suppose a number x has the odd divisor y > 1. Then y consecutive integers centered on x/y (so that their average value is x/y) have x as their sum:
x = ∑ i = x y − y − 1 2 x y + y − 1 2 i . {\displaystyle x=\sum _{i={\frac {x}{y}}-{\frac {y-1}{2}}}^{{\frac {x}{y}}+{\frac {y-1}{2}}}i.}
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. (The requirement that y > 1 corresponds to the requirement that a polite representation have more than one term; applying the same construction for y = 1 would just lead to the trivial one-term representation x = 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:
14 = (2 − 3) + (2 − 2) + (2 − 1) + 2 + (2 + 1) + (2 + 2) + (2 + 3). The first term, −1, cancels a later +1, and the second term, zero, can be omitted, leading to the polite representation
… excerpt ends here. Continue reading the full article.


