Generate Hofstadter's Figure-Figure Sequence
CJam, 38 30 29 21 bytes

li_3*,2&gt;\{(_pX+:X-}*;


Try it online.

How it works

li                     " Read an integer N from STDIN.              ";
  _3*,2&gt;               " Push S := [ 2 3 ... (N * 3 - 1) ].         ";
        \{        }*   " Do the following N times:                  ";
          (            " Shift an integer I from S.                 ";
           _p          " Print a copy of I, followed by a linefeed. ";
             X+:X      " Execute X += I. (X is initialized to 1.)   ";
                 -     " Remove X from S.                           ";
                    ;  " Discard S from the stack.                  ";


Example run

$ cjam &lt;(echo 'li_3*,2&gt;\{(_pX+:X-}*;') &lt;&lt;&lt; 20
2
4
5
6
8
9
10
11
13
14
15
16
17
19
20
21
22
23
24
25