Calculating u mentioned in the formula
function ucal ( u , n ) { if ( n == 0 ) return 1 ; var temp = u ; for ( var i = 1 ; i <= n / 2 ; i ++ ) temp = temp * ( u - i ) ; for ( var i = 1 ; i < n / 2 ; i ++ ) temp = temp * ( u + i ) ; return temp ; }