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”).

A007339
a(n) = n! - n^3.
(Formerly M4140)
7
1, 0, -6, -21, -40, -5, 504, 4697, 39808, 362151, 3627800, 39915469, 478999872, 6227018603, 87178288456, 1307674364625, 20922789883904, 355687428091087, 6402373705722168, 121645100408825141, 2432902008176632000
OFFSET
0,3
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
E.g.f.: 1/(1 - x) - x*(1 + 3*x + x^2)*exp(x). - Ilya Gutkovskiy, Jan 27 2017
MATHEMATICA
Table[n!-n^3, {n, 0, 20}] (* Harvey P. Dale, Jul 02 2012 *)
PROG
(Magma) [Factorial(n)-n^3: n in [0..20]]; // Vincenzo Librandi, Oct 06 2011
CROSSREFS
Sequence in context: A031042 A064431 A031094 * A363621 A225150 A056237
KEYWORD
sign
STATUS
approved