private boolean rightToLeftPrime(int n) {
        int loop = String.valueOf(n).length() - 1;
        for (int i = 0; i < loop; i++) {
            n /= 10;
            if (!EulerFunction.isPrime(n))
                return false;
        }
        return true;
    }