Georg, > is there an efficient way in sage to find the smallest integer k for > which the inequality > > b^(k+1) / (factorial(k) * factorial(k+1)) <= 1 > > is true (b > 0)
Stirling's expansion gives (when b goes to infinity) k ~ sqrt(b)*exp(1). Thus it suffices to evaluates f(k) = b^(k+1) / (factorial(k) * factorial(k+1)) at this starting point. If f(k) < 1, increasing k by 1 will multiply f(k) by a factor about b/k^2 ~ exp(-2); if f(k) < 1, decreasing k by 1 will multiply f(k) by a factor about exp(2). Thus log(f(k))/2 at the starting point should give you the number of corrections steps (more probably 0 or 1). Paul Zimmermann --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---