Problem

Source: Switzerland - 2018 Swiss MO Final Round p7

Tags: number theory, consecutive, Divisors



Let $n$ be a natural integer and let $k$ be the number of ways to write $n$ as the sum of one or more consecutive natural integers. Prove that $k$ is equal to the number of odd positive divisors of $n$. Example: $9$ has three positive odd divisors and $9 = 9$, $9 = 4 + 5$, $9 = 2 + 3 + 4$.