Most backoff/delay algorithms I've seen have fixed number of attempts OR fixed timeout, but not both.
I want to make exactly M attempts within T seconds, with exponential spacing between them, so that "T = delay(0) + delay(1) + ... + delay(M-1)", where "delay(N) = (e^N - 1) / e" (where N - retry number).
How to calculate "e" value in the description above, so that exactly M attempts will be made within overall timeout T (with M and T specified in advance)?