From: Sebastian Garth on
First of all, I'm not a mathematician, but a computer programmer, and
as such I'm having a difficult time extrapolating the math to code.
What I'm actually trying to do is efficiently calculate Faulhaber(N,
E) modulo M, where N, E, and M can be arbitrarily large, or at least
Faulhaber(N, E) (the modulo operation could be worked in later). From
what I have read, it seems that this is generally expressed in terms
of either a polynomial to the degree of N+1 (memory-expensive) or some
recursive relationship (time-expensive). Is there any way that this
can be done that requires neither very much memory nor time?