#dc, 9 0?dvd*-^p Outputs 1 for truthy and 0 for falsey. [Try it online][1]. 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 0<sup>0</sup>=1 and 0<sup>n</sup>=0, where n>0. [1]: https://tio.run/##RYtBCsIwEADvfcVQlIIQaDW0AUF/ItTslvaSlCb05N@jCOIcZ5jnmOYyxY2sKfsxKUugpaO3OMe5s4N1l94OVyRWfFi3JeSJ@pgwN2oOv/Nb1c/xr3ghHqM0pb3LLifzWEtTSQxa3g