public int howMany(int lowerBound, int upperBound) {
		ArrayList<Integer> list = new ArrayList<Integer>();
		list.add(0);
		list.add(1);
		for (int i = 2; i * i <= upperBound; i++) {
			long z = i * i;
			while (z <= upperBound) {
				list.add((int) z);
				z *= i;
			}
		}
		boolean[] check = new boolean[2 * upperBound + 100];
		for (Integer i : list) {
			for (Integer j : list) {
				check[i + j] = true;
			}
		}
		int count = 0;
		for (int i = lowerBound; i <= upperBound; i++) {
			if (check[i])
				count++;
		}
		return count;
	}