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:

$\displaystyle 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:

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

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

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

then

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

and

$\displaystyle 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 $\displaystyle \mathcal{O}$ be the set of all odd divisors of $\displaystyle n$ and $\displaystyle \mathcal{C}=\{(x,r): \ x \in \mathbb{N}, \ r \in \mathbb{N} \cup \{0 \}, \ 2n=(r+1)(2x+r) \}.$ the condition $\displaystyle 2n=(r+1)(2x+r)$

is obviously equivalent to $\displaystyle n=x + x+1 + \cdots + x + r.$ now define $\displaystyle f: \mathcal{O} \longrightarrow \mathcal{C},$ by: $\displaystyle 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 $\displaystyle f$ is well-defined and injective. to prove that $\displaystyle f$ is surjective, pick $\displaystyle (x,r) \in \mathcal{C}.$ if $\displaystyle r$ is even or zero, then let $\displaystyle d=r+1,$ and

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

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

3. How about $\displaystyle \blacksquare$ ?

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