How many distinct trapezoidal
decompositions (sum of consecutive
positive integers) does n have?
For example, 15 = 7+8 = 4+5+6 =
1+2+3+4+5 has three.
Let F be the first and term in some trapezoidal decomposition. Let there be D terms. Then a formula for the sum of an arithmetic sequence with a common difference of 1 is N = (D/2)*(2F+D-1).
Multiply through by 2 and get 2N = D * (2F+D-1). Note that the two terms of the product are of opposite parity, therefore at least one is odd.
Then there is a solution whenever 2N has a factorization with an odd number. But the presence of factors of 2 in 2N has no bearing on any odd factor, so we can refine that to say there is a trapezoidal decomposition for each odd factor of N.
This also includes the trivial decomposition of a single term N=N (when D=1), so we need to subtract 1 from that total.
Thus the number of distinct trapezoidal decompositions of N is one less than the number of odd factors of N.