Cubix, 2422 24 bytes
0 is truthy, nothing is falsey
@1O0I@0O1I!^/@.>u;r\.W<rq\?-p+qv;up+;;u @ 10 O 01 I ! ^ / @ . >W u< ; r \q .\ ? - p + ; q; vu ;. u. The silly thing is that I have a solution that could be shorter, but it will only run on a 3x3x3 cubeI may be able to get a couple more out of this . I may be able to get a couple more out of this, but it's getting tight.. found them with a change to the initial redirect into the loop
Iget the integer to check!check for 0 input^O@if zero, output and halt/01initialise the stack for doing the sequence>uW<Wchange lane onto the redirect and u-turnback to self, then change lane into the looping section+p-?bring the check value to the top, subtract and check/@On a positive result reflect and halt\^O@On a zero result reflect, output and haltvu;q\r;u;\qr;Remove the check, move check value to bottom, rotate the sum, remove the low value. Continue into loop.