Math, asked by sekharm7629, 11 months ago

Check whether the number is triangular or not. A number is termed as triangular number if we can represent it in the form of triangular grid of points such that the points form an equilateral triangle and each row contains as many points as the row number, i.E., the first row has one point, second row has two points, third row has three points and so on. The starting triangular numbers are 1, 3 (1+2), 6 (1+2+3), 10 (1+2+3+4).

Answers

Answered by aditya6973
0

Step-by-step explanation:

The definition of a triangular number is

Tn=1+2+3+⋯+n=n⋅(n+1)2

Solve for n:

2⋅Tn=n2+n

n2+n−2⋅Tn=0

D=12−4⋅1⋅(−2⋅Tn)=1+8⋅Tn

n=−1±1+8⋅Tn√2

It is easy to check that n is an integer if and only if 1+8⋅Tn is a perfect square.

Similar questions