It's late at night and I'm tired, but I just stumbled across this while doing my homework. Any chance this is new? Or, maybe, did I just somehow transform it and it is still basically the same formula? In that case, forgive me, please.

Anyway, here it is. It is a recursive function (thus, of limited use!?) to calculate the sum of factorials:

$f(n) = \sum\limits_{i=1}^n i! = \frac{(n+1)!}{n}+f(n-2)$


$f(0) = 0$ and $f(-1) = -1$

Is this useful at all or did I just waste my time? :)


The formula certainly is true. Re-arranging what you wrote you get

$$ f(n) - f(n-2) = n! + (n-1)! = n(n-1)! + (n-1)! $$

$$ = (n+1)\times (n-1)! = \frac{(n+1)\times n\times (n-1)!}{n} = \frac{(n+1)!}{n} $$

but I don't think it is particularly more useful than the observation of, say,

$$ f(n) = n! + f(n-1) $$

The definition of your function as a sum means that it naturally can be described recursively. I don't think the formulation you gave offers any particular advantage to the summation formula, unfortunately.

  • 3
    $\begingroup$ Ah, too bad. Thanks for the writeup. $\endgroup$ – Franz Jan 25 '11 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.