Smallest integer which cannot be derived from set of numbers Let's assume that I have k number of ns (e.g. 6,6 , k = 2 , n = 6) 
I'd like to find the smallest integer larger than 1 which cannot be derived by any combination of these numbers
Here by combination I mean all the numbers which can be derived by putting 4 main operators (+ , - , / , *) between these numbers.
For example, the numbers which can be created by 2 6's are : 
$6 + 6 = 12$
$6 \cdot 6 = 36$
$6 - 6 = 0 $
$\frac 66 = 1$
Therefore, the smallest such integer would be 2.
I solved this problem in brute force. Is there any better way ? because here the time and space complexity are very high.
public static int smallest_non_combined(int n , int k){
    HashSet<Integer> set = new HashSet<Integer>();
    combination((double)n, k, set, 1 , (double)n);
    double r = 2;
    while (set.contains(r))
        r++;
    return (int)r;
}
public static void combination(double n , int k , HashSet<Integer> set , int index , double r){
    if (index >= k){
        if (r > 1 && r == (int)r)
            set.add((int)r);
    }else{
        combination(n , k , set , index+1, r + n);
        combination(n , k , set , index+1, r * n);
        combination(n , k , set , index+1, r / n);
        combination(n , k , set , index+1, r - n);
    }
    return;
}


Not really.  It is much worse if all the numbers are different.  You basically can create all the $4^{k-1}$ expressions and evaluate them, but even that will have trouble depending on the rules for parentheses.  For example, can I write $(5+5)*(5+5)=100$ under your rules?  If so it is even worse, as well.  If you always operate left to right (no parentheses) and have different numbers, you get $k!4^{k-1}$, which grows very rapidly as you say.
