login
A262376
a(n) = Sum_{k=0..n} (k! - k).
1
1, 1, 1, 4, 24, 139, 853, 5886, 46198, 409069, 4037859, 43954648, 522956236, 6749977023, 93928268209, 1401602636194, 22324392524178, 378011820620161, 6780385526348143, 128425485935180124, 2561327494111820104, 53652269665821260083, 1177652997443428940061
OFFSET
0,4
LINKS
FORMULA
a(n) = Sum_{k=0..n} k! - k.
a(n) = A003422(n+1) - A000217(n). - Altug Alkan, Sep 20 2015
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
Partial sums of A005096.
Sequence in context: A122690 A183512 A364277 * A204199 A005319 A155119
KEYWORD
nonn,easy
AUTHOR
Daniel Suteu, Sep 20 2015
STATUS
approved