1. ## Arithmetic Functions

Prove that the number of ways of writing n as a sum of consecutive integers is d(m) where m is the largest odd number dividing n.

OK so here is a selection of my attempts to date!

If x is the first number in the sum and there are r+1 terms we have:

$n = x + (x+1) + (x+2) + ... + (x+r) = (r+1)*x + 1 + 2 + ... + r = (r+1)*x + \frac{r(r+1)}{2}$

So we must find the number of integer solutions to:

$n = (r+1)*x + \frac{r(r+1)}{2}$

Not sure how to proceed from here so I tried starting from the answer. If

$n=2^{a_1}3^{a_2}5^{a_3}...P_s^{a_s}$

then

$m=3^{a_2}5^{a_3}...P_s^{a_s}$

and

$d(m)=(1+a_2)(1+a_3)....(1+a_s)$

2. Originally Posted by Kiwi_Dave
Prove that the number of ways of writing n as a sum of consecutive integers is d(m) where m is the largest odd number dividing n.
let $\mathcal{O}$ be the set of all odd divisors of $n$ and $\mathcal{C}=\{(x,r): \ x \in \mathbb{N}, \ r \in \mathbb{N} \cup \{0 \}, \ 2n=(r+1)(2x+r) \}.$ the condition $2n=(r+1)(2x+r)$

is obviously equivalent to $n=x + x+1 + \cdots + x + r.$ now define $f: \mathcal{O} \longrightarrow \mathcal{C},$ by: $f(d)= \begin{cases}
(\frac{n}{d} - \frac{d-1}{2}, \ d-1) & \ \ \text{if} \ \ \frac{d(d-1)}{2} < n \\ \\
(\frac{d+1}{2} - \frac{n}{d}, \ \frac{2n}{d} - 1) & \ \ \text{if} \ \ \frac{d(d-1)}{2} \geq n .
\end{cases}
$

it's easy to see that $f$ is well-defined and injective. to prove that $f$ is surjective, pick $(x,r) \in \mathcal{C}.$ if $r$ is even or zero, then let $d=r+1,$ and

if $r$ is odd, then let $d=2x+r.$ it should be straightforward for you to see that $f(d)=(x,r).$ so $f$ is a bijection and we're done! $\boxed{\text{NCA}}$

by the way $\boxed{\text{NCA}}$ just means that "the proof is complete!" i think it looks better than $\square$ !

3. How about $\blacksquare$ ?

4. Originally Posted by NonCommAlg
by the way $\boxed{\text{NCA}}$ just means that "the proof is complete!" i think it looks better than $\square$ !
If we're going to use our initials in the box then I'll go for $\boxed{\textsf{O}}$.