title: How can I use a “for” loop to find the first 3 perfect numbers after 28?
body: <p>How can I use a “for” loop to find the first 3 perfect numbers after 28? 
  Here is some code I'm using.</p>
  
  <p>I can't seem to get anything past 2 numbers. If I try to increase i&lt;= 2000000000 it tells me the integer is to large.</p>
  
  <pre><code>public class JBaneling
  {
      public static void main(String args[])
      {
          System.out.println("3 nearest Perfect numbers after 29 ");
  
          for (int i = 29; i &lt;= 2000000000; i++) {
              test1(i);
          }
      }
  
  
  
      public static void test1(int number)
      {
          int sum = 0;
  
          for(int divisor=1; divisor &lt; number; divisor++)
          {
              if ((number % divisor) ==0)
              {
                  sum = sum + divisor;
              }
          }
  
          if(sum==number)
          {
              System.out.println(number + " is a perfect number");
          }
      }
  }
  </code></pre>