Triangular Numbers Calculator

Find a triangular number, or test whether one is.

A whole number of 1 or more, up to 30 digits.

Try

Result

You entered28=?Tn28 \overset{?}{=} T_n

28 is triangular (T7)\displaystyle 28\text{ is triangular }\left(T_{7}\right)
Show the work
  1. Testing for a triangular number

    A number TT is triangular exactly when 8T+18T + 1 is a perfect square. This comes from solving T=n(n+1)/2T = n(n+1)/2 for nn, which gives n=(8T+1−1)/2n = (\sqrt{8T + 1} - 1)/2, a whole number only when the square root is.

    Using 8T+1=(2n+1)28T + 1 = (2n + 1)^2

    8×28+1=225=152n=15−12=7\begin{gathered} 8 \times 28 + 1 = 225 = 15^{2} \\ n = \frac{15 - 1}{2} = 7 \end{gathered}
  2. Confirming with the formula

    Put n=7n = 7 into the formula for the triangular numbers to confirm.

    Using Tn=n(n+1)2T_n = \frac{n(n+1)}{2}

    T7=7×82=28\begin{aligned} T_{7} &= \frac{7 \times 8}{2} \\ &= 28 \end{aligned}
  3. Result

    28 is triangular (T(7)).

Worked examples