# Not the division algorithm (but fairly similar)

Printable View

• August 2nd 2008, 11:13 AM
Sigyn3
Not the division algorithm (but fairly similar)
Prove that for any positive integer $n$, there exist unique positive integers $k$ and $r$ such that $n = \frac{k(k-1)}{2}+r$ with $1\le r\le k$.
• August 2nd 2008, 05:39 PM
ThePerfectHacker
Quote:

Originally Posted by Sigyn3
Prove that for any positive integer $n$, there exist unique positive integers $k$ and $r$ such that $n = \frac{k(k-1)}{2}+r$ with $1\le r\le k$.

Consider the set $\{ n - \tfrac{x(x-1)}{2}\geq 0 | x\in \mathbb{Z}^+ \}$. There exists a smallest integer $n - \tfrac{k(k-1)}{2} = r$. We claim that $r\leq k$. Assume not, then $r>k$ and we can write $r=r_0+k$ where $r_0. Thus, we have $n - \tfrac{k(k-1)}{2} = r_0+k$ which gives $n-\tfrac{(k+1)k}{2} = r_0$. And this is a contradiction since $r$ was supposed to be minimal.
• August 2nd 2008, 06:10 PM
Sigyn3
Does this also prove uniqueness?