login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A061206
a(n) = total number of occurrences of the consecutive pattern 1324 in all permutations of [n+3].
12
1, 10, 90, 840, 8400, 90720, 1058400, 13305600, 179625600, 2594592000, 39956716800, 653837184000, 11333177856000, 207484333056000, 4001483566080000, 81096733605888000, 1723305589125120000, 38318206628782080000, 889833909490606080000, 21543347282404147200000
OFFSET
1,2
COMMENTS
a(n) is the number of sequences of n+3 balls colored with at most n colors such that exactly four balls are the same color as some other ball in the sequence. - Jeremy Dover, Sep 27 2017
FORMULA
a(n) = n*(n+3)!/24.
If we define f(n,i,x) = Sum_{k=i..n} Sum_{j=i..k} binomial(k,j)*Stirling1(n,k)*Stirling2(j,i) * x^(k-j), then a(n-3) = (-1)^n*f(n,4,-2), (n >= 4). - Milan Janjic, Mar 01 2009
E.g.f.: x/(1-x)^5. (This was initiated by e-mail exchange with Gary Detlefs.) - Wolfdieter Lang, May 28 2010
a(n) = ((n+4)!/6) * Sum_{k=1..n} (k+2)!/(k+4)!. - Gary Detlefs, Aug 05 2010
a(n) = Sum_{k>0} k * A264173(n+3,k). - Alois P. Heinz, Nov 06 2015
a(n) = n!*binomial(-n,4). - Peter Luschny, Apr 29 2016
From Amiram Eldar, Sep 24 2022: (Start)
Sum_{n>=1} 1/a(n) = 118/3 - 16*e - 4*gamma + 4*Ei(1), where gamma is Euler's constant (A001620) and Ei(1) is the exponential integral at 1 (A091725).
Sum_{n>=1} (-1)^(n+1)/a(n) = 2/3 - 8/e + 4*gamma - 4*Ei(-1), where -Ei(-1) is the negated exponential integral at -1 (A099285). (End)
EXAMPLE
a(4)=840 because 4*(7!)/24 = 4*7*6*5 = 840.
MAPLE
a := n -> n!*binomial(-n, 4): seq(a(n), n=1..20); # Peter Luschny, Apr 29 2016
MATHEMATICA
Array[# (# + 3)!/24 &, 20] (* or *) Array[#!*Binomial[-#, 4] &, 20] (* Michael De Vlieger, Sep 30 2017 *)
PROG
(Sage) [binomial(n, 4)*factorial (n-3) for n in range(4, 21)] # Zerinvary Lajos, Jul 07 2009
(Magma) [n*Factorial(n+3)/24: n in [1..20]]; // Vincenzo Librandi, Oct 11 2011
(PARI) a(n) = n*(n+3)!/24; \\ Altug Alkan, Oct 08 2017
KEYWORD
nonn
AUTHOR
Melvin J. Knight (knightmj(AT)juno.com), May 30 2001
EXTENSIONS
More terms from Jason Earls, Jun 12 2001
Corrected by Zerinvary Lajos, Jul 07 2009
More precise definition from Alois P. Heinz, Nov 06 2015
STATUS
approved