Added solution to problem 40 and fixed EulerLong.digits (failed for n == 0).