I am stuck with this question. I know I need a formula from calculus but I can't remember which one. How should I get started with it? Thank you!
If $n$ is a positive integer prove that $1+2+3+\cdots+(n-1)$ is congruent to $0\mod n$ if and only if $n$ is odd
-
1$$1+2+3+\cdots + (n-1) = {n(n-1)\over 2}$$ – 2017-02-22
-
0@pyrazolam how did you figure out this formula? – 2017-02-22
-
0you can find a proof of the formula here: http://www.9math.com/book/sum-first-n-natural-numbers – 2017-02-22
-
0@pyrazolam but this proof attached is for another sum I just want to know how to derive that formula?Thank you so much – 2017-02-22
-
2@JamieJohn "*but this proof attached is for another sum*" the formula for $1+2+\dots+(n-1)$ is directly related to the formula for $1+2+\dots+n$, enough so that they are practically the same formula. It is the largest number (*be it $n$ or $(n-1)$*) times the number one larger than the largest number divided by two. The given link gives the proof as though the largest number was $n$, but the argument works for $n-1$ as well. Just replace every occurrence of the number $n$ with the number one less than $n$. – 2017-02-22
-
0@pyrazolam thank u so much – 2017-02-22
3 Answers
The statement "if and only if" implies that you need to prove the statement in the forward and backward directions. So forward means "if $1+ 2 + 3 + \cdots + (n-1) \equiv 0 \pmod n,$ then $n$ is odd. To get started, note that $$1+ 2 + 3 + \cdots + (n-1) = {1\over2}n(n-1).$$ Suppose towards a contradiction that $n$ is even, or in other words, $n=2m$, where $m\in\mathbb N$. Then $${{1\over2}n(n-1) \over n} = {{1\over2}(2m)(2m-1) \over 2m} = {2m-1\over2},$$ but clearly $2m-1$ is odd, so the divisibility does not happen.
Now we want to do the reverse direction (i.e., "If $n$ is odd, then ${n(n-1)\over2}\equiv0 \pmod n.$"). Suppose that $n = 2m-1$, where $m\in\mathbb N$. Then $${{{1\over2}n(n-1)}\over n} = {1\over2}(n-1) = {1\over2}(2m-1-1) = {1\over2}(2m-2) = {2\over2}(m-1) = m-1.$$ It is clear that $m-1$ is an integer, and therefore ${1\over2}n(n-1) \equiv 0\pmod n.$
-
0Thank you so much that helped alot! – 2017-02-22
-
0@JamieJohn, I have updated my answer for clarity. – 2017-02-22
-
0@thanks alot :) – 2017-02-22
-
0how did you get the formula 1/2n(n-1)? – 2017-02-22
We can pair up the numbers into chunks which add up to $n$, as $(1, n-1)$, $(2, n-2)$, and so on up to $(\frac{n-1}{2}, \frac{n+1}{2})$ (if $n$ is odd) or we're left with a single $\frac{n}{2}$ in the middle if $n$ is even. [For example, if $n=6$, we have $(1,5), (2,4), 3$; if $n=7$, we have $(1,6), (2,5), (3,4)$.]
Therefore the sum is congruent to $\frac{n}{2}$ mod $n$ if $n$ is even, and to $0$ if $n$ is odd.
$1 + 2 + 3 + .....+ (n-1) = n(n-1)/2$.
Proposition:
$n(n-1)/2$ is $0$ mod $n$ iff $n$ is odd.
$\Rightarrow$:
1) Assume $n(n-1)/2$ is divisible by $n$, then
$n(n-1)/2 = s × n$, where $s$ is a positive integer.
$(n-1)/2 = s$, and finally $n= 2s + 1$, an odd number.
$\Leftarrow$:
2) Assume $n$ is odd:
Then $(n-1)$ is even, and $(n-1)/2 = r$, a positive integer.
We have $n(n-1)/2 = r×n$, hence $n$ divides $n(n-1)/2$.