User:Wguynes/Proofs/Triangular number test

From Wikipedia, the free encyclopedia

Let T = number to test


T = \frac{n(n+1)}{2}

n2 + n − 2T = 0

Find the roots of the quadratic. What value of n would make our T?


n = \frac
  { -1 \pm \sqrt{ 1^2 - 4 (1)(-2T) } }
  { 2 \cdot 1 }
= \frac{ -1 \pm \sqrt{ 8T + 1 } }{2}

Only one of these two roots can be a positive result.


n = \frac{ \sqrt{ 8T + 1 } - 1 }{2}