# Thread: Modulo proof help2

1. ## Modulo proof help2

Let n be a positive integer. Prove that 1+2+3.....+(n-1) =0mod n if and only if n is odd.

I assumed first that 1 +2+3...+(n-1)=o mod n. Show n is odd. We know by the Appendix that 1+2+3...+n= [n(n+1)]\2
I plugged n-1 into n in the above equation. which is [n(n-1)]/2. Now do I let that be congruent to 0modn?!?

If you could help I would really appreciate it! Thanks!

2. Originally Posted by kel1487
Let n be a positive integer. Prove that 1+2+3.....+(n-1) =0mod n if and only if n is odd.

I assumed first that 1 +2+3...+(n-1)=o mod n. Show n is odd. We know by the Appendix that 1+2+3...+n= [n(n+1)]\2
I plugged n-1 into n in the above equation. which is [n(n-1)]/2. Now do I let that be congruent to 0modn?!?

If you could help I would really appreciate it! Thanks!
Actually its simple if you observe that 2 divides n-1 iff n is odd.

3. Note that: $1+2+...+(n-2)+(n-1)=[(n-1)+1]+[(n-2)+2]+...+\left[\left(n-\frac{n-1}{2}\right)+\frac{n-1}{2}\right]$ if n is odd

If n is even: $1+2+...+(n-2)+(n-1)=[(n-1)+1]+[(n-2)+2]+...+\left[\left(n-\frac{n-2}{2}\right)+\frac{n-2}{2}\right]+\frac{n}{2}$