login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A005096
a(n) = n! - n.
16
1, 0, 0, 3, 20, 115, 714, 5033, 40312, 362871, 3628790, 39916789, 479001588, 6227020787, 87178291186, 1307674367985, 20922789887984, 355687428095983, 6402373705727982, 121645100408831981, 2432902008176639980, 51090942171709439979, 1124000727777607679978
OFFSET
0,4
COMMENTS
McCombinations: in 2002, McDonald's advertised a McChoice menu of 8 items under the heading "40,312 combinations" rather than the more obvious 2^8-1=255 (A000225). The Advertising Standards Authority "considered that the number quoted in the advertisement was not necessarily so exaggerated as to be misleading". - Henry Bottomley, May 01 2003
LINKS
Advertising Standards Authority, McDonald's Restaurants Ltd (archived May 10 2004).
FORMULA
a(n) = n*a(n-1)+n(n-2) = n*A033312(n-1) = A000142(n)-n. - Henry Bottomley, May 01 2003
E.g.f.: 1/(1 - x) - x*exp(x). - Ilya Gutkovskiy, Jan 27 2017
MAPLE
A005096:=n->n!-n: seq(A005096(n), n=0..25); # Wesley Ivan Hurt, Oct 28 2014
MATHEMATICA
lst={}; Do[AppendTo[lst, n!-n], {n, 3*4!}]; lst (* Vladimir Joseph Stephan Orlovsky, Nov 20 2008 *)
Table[n! - n, {n, 0, 25}] (* Wesley Ivan Hurt, Oct 28 2014 *)
PROG
(Magma) [Factorial(n) - n: n in [0..25]]; // Vincenzo Librandi, Jul 20 2011
(PARI) a(n)=n!-n \\ Charles R Greathouse IV, Oct 28 2014
CROSSREFS
Sequence in context: A178711 A257067 A108911 * A275796 A164535 A001652
KEYWORD
nonn
STATUS
approved