#dc, 9
dc, 9
0?dvd*-^p
Outputs 1 for truthy and 0 for falsey.
0 # Push zero. Stack: [ 0 ]
? # Push input. Stack: [ n, 0 ]
dv # duplicate and take integer square root. Stack: [ ⌊√n⌋, n, 0 ]
d # duplicate. Stack: [ ⌊√n⌋, ⌊√n⌋, n, 0 ]
* # multiply. Stack: [ ⌊√n⌋², n, 0 ]
- # take difference. Stack: [ n-⌊√n⌋², 0 ]
^ # 0 to power of the result. Stack: [ 0^(n-⌊√n⌋²) ]
p # print.
Note dc
's ^
exponentiation command gives 00=1 and 0n=0, where n>0.