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 entered30=?Tn30 \overset{?}{=} T_n

30 is not triangular (between T7=28 and T8=36)\displaystyle 30\text{ is not triangular (between }T_{7} = 28\text{ and }T_{8} = 36\text{)}
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×30+1=241152=225<241<256=162\begin{gathered} 8 \times 30 + 1 = 241 \\ 15^{2} = 225 < 241 < 256 = 16^{2} \end{gathered}
  2. The neighbouring triangular numbers

    Since 241241 is not a perfect square, 3030 is not triangular. It lies between the triangular numbers for n=7n = 7 and n=8n = 8.

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

    T7=28<30<36=T8\begin{aligned} T_{7} &= 28 < 30 < 36 \\ &= T_{8} \end{aligned}
  3. Result

    30 is not triangular (between T(7) = 28 and T(8) = 36).

Worked examples