05AB1E, 7 bytes
8*1+t.ï
n is triangular if sqrt(8n + 1) is an integer
How it works
8* # multiply implicit input by 8
1+ # add one
t # sqrt
.ï # is integer
Neil A.
- 2.1k
- 8
- 23
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange