public static void main(String[] args) {
        ArrayList<Integer> abundants = new ArrayList<Integer>();
        final int n = 28123;
        final int n2 = n / 2;
        final int[] d = new int[n + 1];
        for (int i = 1; i <= n2; i++) {
            int j = i;
            while (j + i <= n) {
                j += i;
                d[j] += i;
            }
        }

        for (int i = 1; i <= n; i++) {
            if (d[i] > i) {
                abundants.add(i);
//                System.out.println(i + "\t" + d[i]);
            }
        }

        final int[] ints = new int[n + 1];
        for (int i = 0; i < abundants.size(); i++) {
            final int ab1 = abundants.get(i);
            for (int j = 0; j < abundants.size(); j++) {
                final int ab2 = abundants.get(j);
                if (ab1 + ab2 <= n) {
                    ints[ab1 + ab2]++;
                }
            }
        }

        int sum = 0;
        for (int i = 0; i <= n; i++) {
            if (ints[i] == 0) {
//                System.out.println(i);
                sum += i;
            }
        }

        System.out.println("# sum = " + sum);
    }