public class HashDemo {

private static final int HASH_INCREMENT = 0x61c88647;
// private static final int HASH_INCREMENT = 1640531527;

public static void main(String[] args) {
//2的n次方
magicHash(2 *2*2*2*2);
// magicHash(32);
}

private static void magicHash(int size) {
int hashCode = 0;
for (int i = 0; i < size; i++) {
hashCode = i * HASH_INCREMENT + HASH_INCREMENT;
System.out.print((hashCode & (size - 1)) + " ");
}
System.out.println("");
}

}