Putnam 2017, Problem B-2

Suppose that a positive integer \( N \) can be expressed as the sum of \( k \) consecutive positive integers  
\[
N = a + (a+1) + (a+2) + \cdots + (a+k-1)
\]  
for \( k = 2017 \) but for no other values of \( k > 1 \). Considering all positive integers \( N \) with this property, what is the smallest positive integer \( a \) that occurs in any of these expressions?

Solution:
We prove that the smallest value of \( a \) is \( 16 \).  

Note that the expression for \( N \) can be rewritten as \( k(2a + k - 1)/2 \), so that \( 2N = k(2a + k - 1) \). In this expression, \( k > 1 \) by requirement; \( k < 2a + k - 1 \) because \( a > 1 \); and obviously \( k \) and \( 2a + k - 1 \) have opposite parity. Conversely, for any factorization \( 2N = mn \) with \( 1 < m < n \) and \( m, n \) of opposite parity, we obtain an expression of \( N \) in the desired form by taking \( k = m \), \( a = (n + 1 - m)/2 \).  

We now note that \( 2017 \) is prime. (On the exam, solvers would have had to verify this by hand. Since \( 2017 < 45^2 \), this can be done by trial division by the primes up to \( 43 \).) For \( 2N = 2017(2a + 2016) \) not to have another expression of the specified form, it must be the case that \( 2a + 2016 \) has no odd divisor greater than \( 1 \); that is, \( 2a + 2016 \) must be a power of \( 2 \). This first occurs for \( 2a + 2016 = 2048 \), yielding the claimed result.  

### Reinterpretation
(by Karl Mahlburg) To avoid \( N \) having another representation, for \( k = 2, \ldots, 2016 \), we must have  
\[
N \not\equiv \begin{cases} k/2 & k \equiv 0 \pmod{2} \\ 0 & k \equiv 1 \pmod{2} \end{cases} \pmod{2}.
\]  

Consequently, \( N \not\equiv 0 \pmod{p} \) for any odd prime \( p < 2017 \) and \( N \equiv 0 \pmod{1024} \). Since \( N \) must be divisible by \( 2017 \), this again yields the claimed value of \( a \).