nth number with n distinct prime factors
Java, 170 characters in one line

int a(int n) {
    int a = 2, t = a, m = 1, i = 1;
    Set s = new HashSet();
    while (i++ &gt; 0) {
        if (t % i == 0) {
            s.add(i);
            t /= i;
            if (t == 1) {
                if (s.size() == n) {
                    if (n == m) {
                        break;
                    }
                    m++;
                }
                t = ++a;
                s.clear();
            }
            i = 1;
        }
    }
    return a;
}


Update, +77 characters IOL

int[] f(int n) {
    int[] f = new int[n];
    for (int i = 0; i &lt; n; i++) {
        f[i] = a(i+1);
    }
    return f;
}