Is this number triangular?
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...