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.