#!bin/sh for i in `seq 1 50`;do read j;k=`echo "ibase=2; $j"|bc`;for x in `seq 0 23`;do if [ $[$[$x*$[$x-1]]/2] -eq $k ];then echo 1;break;elif [ $x -eq 22 ];then echo 0;fi;done;done