Smallest N digit number divisible by all possible prime digits | Function to find the minimum number of n digits divisible by all prime digits ; Driver Code
function minNum ( n ) { if ( n < 3 ) document . write ( - 1 ) ; else document . write ( ( 210 * ( parseInt ( Math . pow ( 10 , n - 1 ) / 210 ) + 1 ) ) ) ; } var n = 5 ; minNum ( n ) ;