if a number belongs to 4 series it should lie between 2 ^ blocks - 1 to 2 ^ blocks + 2 ^ ( blocks - 1 ) - 1
bool isSeriesFour ( int N , int digits ) { int upperBound = int ( pow ( 2 , digits ) + pow ( 2 , digits - 1 ) - 1 ) ; int lowerBound = int ( pow ( 2 , digits ) - 1 ) ; return ( N >= lowerBound ) && ( N < upperBound ) ; }