cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A005096 a(n) = n! - n.

This page as a plain text file.
%I A005096 #30 Mar 06 2024 04:43:55
%S A005096 1,0,0,3,20,115,714,5033,40312,362871,3628790,39916789,479001588,
%T A005096 6227020787,87178291186,1307674367985,20922789887984,355687428095983,
%U A005096 6402373705727982,121645100408831981,2432902008176639980,51090942171709439979,1124000727777607679978
%N A005096 a(n) = n! - n.
%C A005096 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
%H A005096 Vincenzo Librandi, <a href="/A005096/b005096.txt">Table of n, a(n) for n = 0..300</a>
%H A005096 Advertising Standards Authority, <a href="https://web.archive.org/web/20040510130606/http://www.asa.org.uk/adjudications/show_adjudication.asp?adjudication_id=34845">McDonald's Restaurants Ltd</a> (archived May 10 2004).
%H A005096 <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>
%F A005096 a(n) = n*a(n-1)+n(n-2) = n*A033312(n-1) = A000142(n)-n. - _Henry Bottomley_, May 01 2003
%F A005096 E.g.f.: 1/(1 - x) - x*exp(x). - _Ilya Gutkovskiy_, Jan 27 2017
%p A005096 A005096:=n->n!-n: seq(A005096(n), n=0..25); # _Wesley Ivan Hurt_, Oct 28 2014
%t A005096 lst={};Do[AppendTo[lst, n!-n], {n, 3*4!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Nov 20 2008 *)
%t A005096 Table[n! - n, {n, 0, 25}] (* _Wesley Ivan Hurt_, Oct 28 2014 *)
%o A005096 (Magma) [Factorial(n) - n: n in [0..25]]; // _Vincenzo Librandi_, Jul 20 2011
%o A005096 (PARI) a(n)=n!-n \\ _Charles R Greathouse IV_, Oct 28 2014
%Y A005096 Cf. A000142, A033312.
%K A005096 nonn
%O A005096 0,4
%A A005096 _N. J. A. Sloane_