Is this number triangular? Challenge
Given a positive integer, determine whether it is a triangular number, and accordingly output one of any two constant, distinct values.
Definition
A triangular number is a number that can be expressed as the sum of consecutive positive integers, starting at 1. They can also be expressed with the formula \$\frac {n(n + 1)}  2\$, where \$n\$ is some positive integer.
Test cases
Truthy:
1
3
6
10
15
21
55
276
1540
2701
5050
7626
18915
71253
173166
222111
303031
307720
500500
998991

Falsy:
2
4
5
7
8
9
11
16
32
50
290
555
4576
31988
187394
501500
999999

Rules

Your entry may be a function or a program.
You may assume that the input is a positive integer under \$10^6\$.
You must pick two constant, distinct outputs to distinguish the two categories.

This is code-golf, so the shortest code in bytes in each language wins.
Haskell, 23 bytes

EDIT:


-1 byte: @xnor got rid of parentheses with a $.


An anonymous function taking an Int and returning a Char.

Output is '1' for triangular numbers and '0' for others.



(!!)$show.(10^)=&lt;&lt;[0..]


Try it online!


Use as ((!!)$show.(10^)=&lt;&lt;[0..]) 998991.
Generates the numbers 1, 10, 100, 1000, ..., converts those to strings, and concatenates them. Then indexes into the resulting infinite string

"1101001000100001000001000000...