If the digit is a prime number , set the index of the digit to 1 in the bitmask .
if ( digit in primeIndex ) : NEW_LINE INDENT val += countOfNumbers ( index + 1 , mask | ( 1 << primeIndex [ digit ] ) , N ) NEW_LINE DEDENT else : NEW_LINE INDENT val += countOfNumbers ( index + 1 , mask , N ) NEW_LINE DEDENT