title: Change the order of a sequence
body: <p>I am trying to print a sequence using recursion without a loop. Using the code below, I get the correct output; however, it goes from large to small, and I would like it to go from small to large. What would be the best way to do that? Currently I get the output:</p>
  <p>22 19 16 13 10</p>
  <p>but I would like it to be reversed.</p>
  <pre><code>public class Recursion
  {
      public static void main(String[] args)
      {
          sequence(5);
      }
  
      public static void sequence(int n)
      {
          if (n &gt;= 1)
          {
              int x = ((3*n) + 7);
              System.out.print(x + &quot; &quot;);
              sequence(n-1);
          }
      }
  }
  </code></pre>