login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033312 a(n) = n! - 1.
(Formerly N1614)
77
0, 0, 1, 5, 23, 119, 719, 5039, 40319, 362879, 3628799, 39916799, 479001599, 6227020799, 87178291199, 1307674367999, 20922789887999, 355687428095999, 6402373705727999, 121645100408831999, 2432902008176639999 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

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

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

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

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

REFERENCES

A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 181.

Problem 598, J. Rec. Math., 11 (1978), 68-69.

N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..300

S. Legendre, P. Paclet, On the Permutations Generated by Cyclic Shift , J. Int. Seq. 14 (2011) # 11.3.2

G. P. Michon, Wilson's Theorem

Hisanori Mishima, Factorizations of many number sequences

Hisanori Mishima, Factorizations of many number sequences

Andrew Walker, Factors of n! +- 1

Eric Weisstein's World of Mathematics, Factorial

Eric Weisstein's World of Mathematics, Permutation Pattern

Index entries for sequences related to factorial numbers

FORMULA

a(n) = Sum_{k = 1 .. n} (k-1)*(k-1)!.

a(n) = a(n - 1)*(n - 1) + a(n - 1) + n - 1, a(0) = 0. - Reinhard Zumkeller, Feb 03 2003

a(0) = a(1) = 0, a(n) = a(n - 1) * n + (n - 1) for n >= 2. - Jaroslav Krizek, Jan 23 2010

E.g.f.: 1/(1 - x) - exp(x). - Sergei N. Gladkovskii, Jun 29 2012

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

EXAMPLE

G.f. = x^2 + 5*x^3 + 23*x^4 + 119*x^5 + 719*x^6 + 5039*x^7 + 40319*x^8 + ...

MATHEMATICA

FoldList[#1*#2 + #2 - 1 &, 0, Range[19]] (* Robert G. Wilson v, Jul 07 2012 *)

Range[0, 19]! - 1 (* Alonso del Arte, Jan 24 2013 *)

PROG

(PARI) a(n)=n!-1 \\ Charles R Greathouse IV, Jul 19 2011

(MAGMA) [Factorial(n)-1: n in [0..25]]; // Vincenzo Librandi, Jul 20 2011

(Maxima) A033312(n):= n!-1$

makelist(A033312(n), n, 0, 30); /* Martin Ettl, Nov 03 2012 */

CROSSREFS

Cf. A000142, A001563 (first differences), A002582, A002982, A038507 (factorizations), A054415, A056110.

Sequence in context: A193704 A294356 A162815 * A151881 A229811 A121636

Adjacent sequences:  A033309 A033310 A033311 * A033313 A033314 A033315

KEYWORD

nonn,easy

AUTHOR

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

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 20 07:17 EDT 2018. Contains 316378 sequences. (Running on oeis4.)