Function to return the value of f ( n ) for given values of a , b , c , n
function func ( a , b , c , n ) { let res = a * n ; let logVlaue = Math . floor ( Math . log ( n ) / Math . log ( 2 ) ) ; res += b * n * logVlaue ; res += c * ( n * n * n ) ; return res ; } function getPositionInSeries ( a , b , c , k ) { let start = 1 , end = SMALL_N ;