Function to return the value of f ( n ) for given values of a , b , c , n
def func ( a , b , c , n ) : NEW_LINE INDENT res = a * n NEW_LINE logVlaue = floor ( log2 ( n ) ) NEW_LINE res += b * n * logVlaue NEW_LINE res += c * ( n * n * n ) NEW_LINE return res NEW_LINE DEDENT def getPositionInSeries ( a , b , c , k ) : NEW_LINE INDENT start = 1 NEW_LINE end = SMALL_N NEW_LINE DEDENT