public void Solve() {
        HashMap<Integer, Integer> nextNumberMemo = new HashMap<Integer, Integer>();

        int longestChaingSize = 0;
        int smallestMember = 0;
        for (int n = 1; n < _maxTerm; n++) {
            List<Integer> chain = GetChain(n, n, new HashSet<Integer>(), nextNumberMemo);
            if (chain != null && longestChaingSize < chain.size() && chain.get(0) == n) {
                longestChaingSize = chain.size();
                smallestMember = Integer.MAX_VALUE;
                for (Integer integer : chain) {
                    if (integer < smallestMember) {
                        smallestMember = integer;
                    }
                }
                System.out.println(n + " - " + longestChaingSize + " - " + smallestMember);
            }
        }

        System.out.println("Results=" + smallestMember);
    }