What is the greatest $4$-digit integer for which the sum of its proper divisors is $n-1$ 
What is the greatest  $4$-digit integer $n$ for which the sum of its proper divisors is $n-1$?

I can't think of a way to solve this without guessing and checking.
Edit: It is easy to show that all powers of $2$ are such numbers. But are they the only numbers?

I get $8192$. This is also $2^{13}$, which I'm sure is significant. I was lazy and programmed it. Its divisors are 1,2,4,8,16,32,64,128,256,512,1024,2048,4096.
using System;

class Program
{
static void Main()
{

    int result = 9999;

    for (int i = 9999; i >= 1000; i--)
    {
        if (SumOfDivisors(i) == i - 1)
        {
            result = i;
            break;
        }
    }

    Console.WriteLine(result);
    Console.ReadKey();
}

//Sums the proper divisors of n
static int SumOfDivisors(int n)
{
    int sum = 0;
    for (int i = 1; i <= n / 2; i++)
    {
        if (n % i == 0) sum += i;
    }
    return sum;
}
}

