As you may or may not know, there's a very useful constant, invented by Euler which is particularly useful in applications of Number Theory and the like. It's defined to be the limit as n -> :inf: of:
Dn = (:sum:i=1 to n 1/i) - log(n+1)
It's also known by the Greek letter :lcgamma: (gamma).
I thought I'd share this quite nice problem to show you what the value of:
:sum: (-1)n+1/n (i.e. the infinite sum 1 - 1/2 + 1/3 - 1/4 + ...)
converges to. The proof goes something like this:
:sum: i = 1 to (2n-1) (-1)i+1 = 1 - 1/2 + 1/3 - 1/4 + ... + 1/(2n-1)
= 1 + 1/2 + 1/3 + ... + 1/(2n-1) - 2[1/2 + 1/4 + ... + 1/(2n-2)]
= D2n-1 + log(2n) - Dn-1 - log(n)
= D2n-1 - Dn-1 + log(2)
Now as n -> :inf:, D2n-1 -> :lcgamma:, Dn-1 -> :lcgamma:, so
:sum: (-1)i+1 = log(2)
Pretty nifty, eh?