For example, I have an expression as a (arbitrary) function of integer n
f[n_]:=10^n*(n^2+4*n)
I want to find the maximum integer n
such that f[n]<=m
for another number m
.
I could formulate this as an integer programming/optimization problem. But that complicates things. I could also just try starting from 1 and continue to test whether the constraint is violated. Is there any more efficient or elegant way of doing this? Please note also the constraint may allow an Infinity
value of n
and I ideally want to detect this situation.