Checking a number for divisibility