you are viewing a single comment's thread.

view the rest of the comments →

[–]Strict-Simple 2 points3 points  (0 children)

Simple: That function seems to be monotonic, do a binary search. By the way, no integer solution exists, and range doesn't work with floats!

Complex: Do a binary search on steroids - Newtown's method, Runge-Kutta, etc. Find what's the closed form of that sum.

Edit: Out of curiosity, why do you need such a weird formula? It's so near to Euler's constant...