Unfortunately the function will not predict the 41st key.
No, but (depending on how you define "close") I'll bet I can get you close to the 41st key. Specifically, I'm nearly certain that I can find you a formula that will result in a value that is less than 2
n-1 * 0.5 (which I think would be 2
n-2) away from the actual private key. So for the 41st key I can get you a value that will be within 2
39 of the actual key (with a 50% chance that my value is actually within 2
38 and a 25% chance that my value is within 2
37).
While I'm being truthful here, those who are aware of the ranges that the random numbers fall between will probably notice the obviousness in my statement.