Find next small/large int with same # of 1 bits