><>, 24 bytes
I'm trying a new language (since my Mathematica licence expired...)
01v>{=n;
1$<^!?(}:{:*@:+
Try it online, or at the fish playground
Assumes the input number is already on the stack, and returns 0 or 1. It works by multiplying together the first n numbers until that stops being less than the input, and then printing 1 if it equals the input, and 0 if it doesn't.
Not a tree
- 3.2k
- 1
- 13
- 24