OFFSET
0,4
LINKS
Daniel Suteu, Table of n, a(n) for n = 0..100
FORMULA
a(n) = Sum_{k=0..n} k! - k.
EXAMPLE
a(3) = 4, which is the following sum: (0!-0) + (1!-1) + (2!-2) + (3!-3).
MATHEMATICA
Table[Sum[k! - k, {k, 0, n}], {n, 0, 22}] (* Michael De Vlieger, Sep 21 2015 *)
PROG
(Sidef)
var sum = 0;
range(0, 10).each { |n|
sum += (n! - n);
say(n, "\t", sum);
};
(PARI) a(n)=sum(i=0, n, i!-i) \\ Anders Hellström, Sep 20 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Daniel Suteu, Sep 20 2015
STATUS
approved