next smallest & next largest with same 1s