title: First 1,000 numbers in the arithmetic sequence 1, 4, 7, 10
body: <p>I'm trying to get the first 1000 numbers in this arithmetic sequence (1,4,7,10,...)
  I must do it using a while loop. I can't figure out how to set the counter so I get my 1000 numbers; I did something like this: </p>
  
  <p>I'm new to programming and do not have much experience, thanks in advance.</p>
  
  <pre><code>public static void main(String[]args) /* main Method */
      {
        int s = 1;
          int sum = 3;
          while ( s &lt; 1000 )
  
               {
                 s = s + sum;
                 System.out.println(s);
               }
  }
  </code></pre>