firstk(n) = { my(res = List()); for(k = 1, n, pow2 = 1<>k); if(h + 2 < 1<