private static boolean[] primeBoolArray(int limit) {
		boolean[] nums = new boolean[limit];
		for (int i = 2; i < nums.length; i++)
			nums[i] = true;
		int nextPrime = 2;
		while (nextPrime < nums.length / 2) {
			int i = nextPrime;
			for (; i < nums.length; i += nextPrime)
				nums[i] = false;
			nums[nextPrime] = true;
			for (int j = nextPrime + 1; j < nums.length; j++) {
				if (nums[j] == true) {
					nextPrime = j;
					break;
				}
			}
		}
		return nums;
	}