%I #2 Mar 30 2012 17:36:24
%S 1,1,1,4,1,1,18,4,1,1,96,18,4,1,1,600,96,18,4,1,1,4320,600,96,18,4,1,
%T 1,35280,4320,600,96,18,4,1,1,322560,35280,4320,600,96,18,4,1,1,
%U 3265920,322560,35280,4320,600,96,18,4,1,1,36288000,3265920,322560,35280,4320
%N Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} starting with exactly k consecutive integers (1<=k<=n).
%C Sum of entries in row n is n!.
%C T(n,1)=A094258(n)=(n-1)!(n-1).
%C Sum(k*T(n,k), k=1..n)=1!+2!+...+n!=A007489(n).
%F T(n,k)=(n-k)!(n-k) if k<n; T(n,n)=1.
%e T(4,2)=4 because we have 1243, 2314, 3412, and 3421.
%e Triangle starts:
%e 1;
%e 1,1;
%e 4,1,1;
%e 18,4,1,1;
%e 96,18,4,1,1;
%e 600,96,18,4,1,1
%p T := proc (n, k) if k = n then 1 elif k < n then factorial(n-k)*(n-k) else 0 end if end proc: for n to 11 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form
%Y Cf. A094258, A007489
%K nonn,tabl
%O 1,4
%A _Emeric Deutsch_, May 15 2010
|