Algorithm to calculate semi perfect integers, lack of efficiency
Funny enough I was working on the same problem.  My performance issue is not the Semi-Perfect part, but the check of abundancy.

You can call this (C#) function to check for a number being SemiPerfect.

static bool IsSemiPerfect(BigInteger delta, BigInteger[] d, BigInteger[] dSum, int index, BigInteger sum)
{
    if (sum == delta)
        return true;

    if (index &gt;= d.Length || sum &gt; delta || delta &gt; (dSum[index] + sum))
        return false;

    for (int i = index; i &lt; d.Length; i++)
    {
        if (IsSemiPerfect(delta, d, dSum, i + 1, sum + d[i]))
            return true;
    }

    return false;
}


The parameters are the following:


delta: sum of the divisors - n
d: divisors, descending sorted!
dSum: a cached calculation of the remaining sum




BigInteger[] dSum = new BigInteger[d.Length];
for (int i = d.Length - 1; i &gt; -1; i--)
{
    BigInteger sum = 0;
    for (int j = divsIndex - 1; j &gt;= i; j--)
        sum += d[j];
    dSum[i] = sum;
}



index: 0, used for recursion
sum: 0, used for recursion


The code runs much faster compared to the other answer, because of 3 major cuts in the search tree and a slightly different approach of the problem.  It is also optimised to find an answer in a progressive way.

A check of a big N = 190000006875 with 119 divisors runs well below 1 second.  I didn't do real profiling but my performance bottleneck is really somewhere else.  It might be NP, but very well doable this way.

It seems that posting a reply in C# code on a Java topic is a bit of bad behaviour.  To make it up I'll give some slightly off-topic but cool code to find really big record breaking weird numbers in Java, using Sidney Kravitz's algorithm.

public static BigInteger getPossibleWeirdNumber(int bits)
{
    BigInteger q = BigInteger.probablePrime(bits, new Random());
    int k = q.bitLength() - 1;
    BigInteger power2k = BigInteger.valueOf(2).pow(k);
    BigInteger r = ((power2k.multiply(q)).subtract(q.add(BigInteger.ONE))).divide(q.add(BigInteger.ONE).subtract(power2k));
    if(r.compareTo(power2k) &gt; 0)
    {
        if(r.isProbablePrime(1000000) &amp;&amp; q.isProbablePrime(1000000)) //Some final checking on primes
        {
            BigInteger weirdNumber = (BigInteger.valueOf(2).pow(k-1)).multiply(q).multiply(r);
            return weirdNumber;
        }
    }
    return null;
}

public static BigInteger getWeirdNumber(int bits)
{
    BigInteger r = getPossibleWeirdNumber(bits);
    while(r == null)
        r = getPossibleWeirdNumber(bits);

    return r;
}


The only problem is that this algorithm does not find odd weird numbers. It's easy to see why: The \$2^{k-1}\$ always will be an even number. Multiplying with an even number always results in an even number, so Sidney Kravitz's trick will help you find large weird numbers, but no odd ones. That's why I manually started looking.

By the way, the reason I used C# is the more clean look of the code when using BigInteger. The operator overloading in .Net is lovely.