public void Solve() {
        HashMap<Integer, BigInteger> partitions = new HashMap<Integer, BigInteger>();
        partitions.put(0, BigInteger.ONE);
        partitions.put(1, BigInteger.ONE);
        int n = 2;
        while (true) {
            int pentagonalIndex = 1;
            int pentagonal = Pentagonal(pentagonalIndex);
            BigInteger currentPartition = BigInteger.ZERO;
            while (pentagonal <= n) {
                BigInteger partition = partitions.get(n - pentagonal);
                if (pentagonalIndex % 2 == 0) {
                    currentPartition = currentPartition.subtract(partition);
                } else {
                    currentPartition = currentPartition.add(partition);
                }

                pentagonalIndex = 0 < pentagonalIndex ? -pentagonalIndex : -pentagonalIndex + 1;
                pentagonal = Pentagonal(pentagonalIndex);
            }

            if (currentPartition.mod(_divisor).equals(BigInteger.ZERO)) {
                System.out.println("Result=" + n);
                break;
            }

            partitions.put(n, currentPartition);
            n++;
        }
    }