public void run() {
        int answer = 0;

        for (int i = 2; i < 10000; i++){

            int input = i;
            int sumA = 0;
            int sumB = 0;
            List<Integer> list = new ArrayList<Integer>();

            list = MathFunctions.factorsOfNumber(input);

            for (int j = 0; j < list.size(); j++) {
                sumA += list.get(j);
            }
            sumA -= input;

            //checks the sum of divisors for the original number
            list = MathFunctions.factorsOfNumber(sumA);
            for (int k = 0; k < list.size(); k++) {
                sumB += list.get(k);
            }
            sumB -= sumA;

            //checks if d(a) = b and d(b) = a, where a not equal b

            if(input == sumB && sumA != sumB){
                answer += input;
            }
        }
        this.answer = answer;
    }