Octave (1515 23)
EDIT: Updated due to user input requirement;
~mod(log2(ainput('')),1)
Input value inLets the user input a (or replace in formula). Outputsvalue and outputs 1 for true, 0 for false.
Tested in Octave, should work in Matlab also.