Preface
This problem was inspired by a similar question last week on SO, that got deleted before it was clear what the real question was. I think this
The sub-optimal solution for the infinite problem for two eggs is to use the sequence 1, 2^2, 3^3,... ,i^2,...
and start the second edge where the last value the first egg remains. So if the first edge remains at n^2
, then the next one will do at most 2*n + 1 - 1
(minus 1 from the first) test to give the total of 3 * n
in the worst case with n = sqrt(m)
.