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.

A033312 a(n) = n! - 1.

This page as a plain text file.
%I A033312 N1614 #115 Aug 20 2025 17:55:44
%S A033312 0,0,1,5,23,119,719,5039,40319,362879,3628799,39916799,479001599,
%T A033312 6227020799,87178291199,1307674367999,20922789887999,355687428095999,
%U A033312 6402373705727999,121645100408831999,2432902008176639999,51090942171709439999,1124000727777607679999
%N A033312 a(n) = n! - 1.
%C A033312 a(n) gives the index number in any table of permutations of the entry in which the last n + 1 items are reversed. - Eugene McDonnell (eemcd(AT)mac.com), Dec 03 2004
%C A033312 a(n), n >= 1, has the factorial representation [n - 1, n - 2, ..., 1, 0]. The (unique) factorial representation of a number m from {0, 1, ... n! - 1} is m = sum(m_j(n)*j!, j = 0 .. n - 1) with m_j(n) from {0, 1, .., j}, n>=1. This is encoded as [m_{n-1},m_{n-2},...,m+1,m_0] with m_0=0. This can be interpreted as (D. N.) Lehmer code for the lexicographic rank of permutations of the symmetric group S_n (see the W. Lang link under A136663). The Lehmer code [n - 1, n - 2, ..., 1, 0] stands for the permutation [n, n - 1, ..., 1] (the last in lexicographic order). - _Wolfdieter Lang_, May 21 2008
%C A033312 For n >= 3: a(n) = numbers m for which there is one iteration {floor (r / k)} for k = n, n - 1, n - 2, ... 2 with property r mod k = k - 1 starting at r = m. For n = 5: a(5) = 119; floor (119 / 5) = 23, 119 mod 5 = 4; floor (23 / 4) = 5, 23 mod 4 = 3; floor (5 / 3) = 1, 5 mod 3 = 2; floor (1 / 2) = 0; 1 mod 2 = 1. - _Jaroslav Krizek_, Jan 23 2010
%C A033312 For n = 4, define the sum of all possible products of 1, 2, 3, 4 to be 1 + 2 + 3 + 4 add 1*2 + 1*3 + 1*4 add 2*3 + 2*4 + 3*4 add 1*2*3 + 1*2*4 + 1*3*4 + 2*3*4 add 1*2*3*4. The sum of this is 119 = (4 + 1)! - 1. For n = 5 I get the sum 719 = (5 + 1)! - 1. The proof for the general case seems to follow by induction. - _J. M. Bergot_, Jan 10 2011
%D A033312 Arthur T. Benjamin and Jennifer J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, identity 181, p. 92.
%D A033312 Michael Doob, The Canadian Mathematical Olympiad & L'Olympiade Mathématique du Canada 1969-1993, Canadian Mathematical Society & Société Mathématique du Canada, Problem 6, 1969, p. 3, 1993.
%D A033312 Problem 598, J. Rec. Math., 11 (1978), 68-69.
%D A033312 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%H A033312 Vincenzo Librandi, <a href="/A033312/b033312.txt">Table of n, a(n) for n = 0..300</a>
%H A033312 Jonathan Beagley and Lara Pudwell, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL24/Pudwell/pudwell13.html">Colorful Tilings and Permutations</a>, Journal of Integer Sequences, Vol. 24 (2021), Article 21.10.4.
%H A033312 The IMO Compendium, <a href="https://imomath.com/othercomp/Can/CanMO69.pdf">Problem 6</a>, 1st Canadian Mathematical Olympiad 1969.
%H A033312 Stéphane Legendre and Philippe Paclet, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Legendre/legendre5.html">On the Permutations Generated by Cyclic Shift </a>, J. Int. Seq. 14 (2011) # 11.3.2.
%H A033312 Gerard P. Michon, <a href="http://www.numericana.com/wilson.htm">Wilson's Theorem</a>.
%H A033312 Hisanori Mishima, <a href="http://www.asahi-net.or.jp/~KC2H-MSM/mathland/matha1/matha105.htm">Factorizations of many number sequences</a>.
%H A033312 Hisanori Mishima, <a href="http://www.asahi-net.or.jp/~KC2H-MSM/mathland/matha1/matha103.htm">Factorizations of many number sequences</a>.
%H A033312 Michael Penn, <a href="https://www.youtube.com/watch?v=DwuzJ4mRkEs">Make it look like a simple calculus problem.</a>, YouTube video, 2021.
%H A033312 Andrew Walker, <a href="http://www.uow.edu.au/~ajw01/ecm/curves.html">Factors of n! +- 1</a>.
%H A033312 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Factorial.html">Factorial</a>.
%H A033312 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PermutationPattern.html">Permutation Pattern</a>.
%H A033312 <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>.
%H A033312 <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>.
%H A033312 <a href="/index/O#Olympiads">Index to sequences related to Olympiads</a>.
%F A033312 a(n) = Sum_{k = 1 .. n} (k-1)*(k-1)!.
%F A033312 a(n) = a(n - 1)*(n - 1) + a(n - 1) + n - 1, a(0) = 0. - _Reinhard Zumkeller_, Feb 03 2003
%F A033312 a(0) = a(1) = 0, a(n) = a(n - 1) * n + (n - 1) for n >= 2. - _Jaroslav Krizek_, Jan 23 2010
%F A033312 E.g.f.: 1/(1 - x) - exp(x). - _Sergei N. Gladkovskii_, Jun 29 2012
%F A033312 0 = 1 + a(n)*(+a(n+1) - a(n+2)) + a(n+1)*(+3 + a(n+1)) + a(n+2)*(-1) for n>=0. - _Michael Somos_, Feb 24 2017
%F A033312 Sum_{n>=2} 1/a(n) = A331373. - _Amiram Eldar_, Nov 11 2020
%e A033312 G.f. = x^2 + 5*x^3 + 23*x^4 + 119*x^5 + 719*x^6 + 5039*x^7 + 40319*x^8 + ...
%t A033312 FoldList[#1*#2 + #2 - 1 &, 0, Range[19]] (* _Robert G. Wilson v_, Jul 07 2012 *)
%t A033312 Range[0, 19]! - 1 (* _Alonso del Arte_, Jan 24 2013 *)
%o A033312 (PARI) a(n)=n!-1 \\ _Charles R Greathouse IV_, Jul 19 2011
%o A033312 (Magma) [Factorial(n)-1: n in [0..25]]; // _Vincenzo Librandi_, Jul 20 2011
%o A033312 (Maxima) A033312(n):= n!-1$
%o A033312 makelist(A033312(n),n,0,30); /* _Martin Ettl_, Nov 03 2012 */
%Y A033312 Cf. A000142, A001563 (first differences), A002582, A002982, A038507 (factorizations), A054415, A056110, A331373.
%Y A033312 Row sums of A008291.
%K A033312 nonn,easy,changed
%O A033312 0,4
%A A033312 _N. J. A. Sloane_. This sequence appeared in the 1973 "Handbook", but was then dropped from the database. Resubmitted by _Eric W. Weisstein_. Entry revised by _N. J. A. Sloane_, Jun 12 2012