public boolean isLuck(int n,int counter){
        if(n < counter){
            return true;
        }
        if(n % counter == 0){
            return false;
        }
        
        return isLuck( n - n/counter,counter+1);
    }
http://www.geeksforgeeks.org/lucky-numbers/
src/com/interview/number/LuckyNumbers.java