A047920
Triangular array formed from successive differences of factorial numbers.
Original entry on oeis.org
1, 1, 0, 2, 1, 1, 6, 4, 3, 2, 24, 18, 14, 11, 9, 120, 96, 78, 64, 53, 44, 720, 600, 504, 426, 362, 309, 265, 5040, 4320, 3720, 3216, 2790, 2428, 2119, 1854, 40320, 35280, 30960, 27240, 24024, 21234, 18806, 16687, 14833, 362880, 322560
Offset: 0
Triangle begins:
1;
1, 0;
2, 1, 1;
6, 4, 3, 2;
24, 18, 14, 11, 9;
120, 96, 78, 64, 53, 44;
...
The left-hand column is the factorial numbers (A000142). The other numbers in the row are calculated by subtracting the numbers in the previous row. For example, row 4 is 6, 4, 3, 2, so row 5 is 4! = 24, 24 - 6 = 18, 18 - 4 = 14, 14 - 3 = 11, 11 - 2 = 9. - _Michael B. Porter_, Aug 05 2016
- Ch. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, Boca Raton, Florida, 2002, p. 176, Table 5.3. [From Emeric Deutsch, Apr 21 2009]
- Reinhard Zumkeller, Rows n = 0..150 of triangle, flattened
- E. Deutsch and S. Elizalde, The largest and the smallest fixed points of permutations, arXiv:0904.2792 [math.CO], 2009.
- J. D. H. Dickson, Discussion of two double series arising from the number of terms in determinants of certain forms, Proc. London Math. Soc., 10 (1879), 120-122. [Annotated scanned copy]
- J. D. H. Dickson, Discussion of two double series arising from the number of terms in determinants of certain forms, Proc. London Math. Soc., 10 (1879), 120-122.
- Ira M. Gessel, Symmetric inclusion-exclusion, Séminaire Lotharingien de Combinatoire, B54b (2005).
- Peter Kagey, Ranking and Unranking Restricted Permutations, arXiv:2210.17021 [math.CO], 2022.
- Index entries for sequences related to factorial numbers
See
A068106 for another version of this triangle.
-
a047920 n k = a047920_tabl !! n !! k
a047920_row n = a047920_tabl !! n
a047920_tabl = map fst $ iterate e ([1], 1) where
e (row, n) = (scanl (-) (n * head row) row, n + 1)
-- Reinhard Zumkeller, Mar 05 2012
-
d[0] := 1: for n to 15 do d[n] := n*d[n-1]+(-1)^n end do: T := proc (n, k) if k <= n then sum(binomial(n-k, j)*d[n-j], j = 0 .. n-k) else 0 end if end proc: for n from 0 to 9 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form - Emeric Deutsch, Jul 17 2009
# second Maple program:
T:= proc(n, k) option remember;
`if`(k=0, n!, T(n, k-1)-T(n-1, k-1))
end:
seq(seq(T(n, k), k=0..n), n=0..12); # Alois P. Heinz, Sep 01 2021
-
t[n_, k_] = Sum[(-1)^j*Binomial[k, j]*(n-j)!, {j, 0, n}]; Flatten[Table[t[n, k], {n, 0, 9}, {k, 0, n}]][[1 ;; 47]] (* Jean-François Alcover, May 17 2011, after Philippe Deléham *)
T[n_, k_] := n! Hypergeometric1F1[-k, -n, -1];
Table[T[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* Peter Luschny, Jul 28 2024 *)
-
row(n) = vector(n+1, k, k--; sum(j=0, n, (-1)^j * binomial(k, j)*(n-j)!)); \\ Michel Marcus, Sep 04 2021
A349980
Irregular triangle read by rows: T(n,k) is the number of n-permutations whose second-shortest cycle has length exactly k; n >= 0, 0 <= k <= max(0,n-1).
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 3, 6, 7, 3, 8, 24, 31, 15, 20, 30, 120, 191, 135, 40, 90, 144, 720, 1331, 945, 280, 420, 504, 840, 5040, 10655, 7077, 4480, 1260, 2688, 3360, 5760, 40320, 95887, 64197, 41552, 11340, 18144, 20160, 25920, 45360, 362880, 958879, 646965, 395360, 238140, 72576, 151200, 172800, 226800, 403200
Offset: 0
Triangle begins:
[0] 1;
[1] 1;
[2] 1, 1;
[3] 2, 1, 3;
[4] 6, 7, 3, 8;
[5] 24, 31, 15, 20, 30;
[6] 120, 191, 135, 40, 90, 144;
[7] 720, 1331, 945, 280, 420, 504, 840;
[8] 5040, 10655, 7077, 4480, 1260, 2688, 3360, 5760;
[9] 40320, 95887, 64197, 41552, 11340, 18144, 20160, 25920, 45360;
...
Column 0 gives 1 together with
A000142.
Column 1 gives the nonzero terms of
A155521.
T(n,n-1) gives
A059171(n) for n>=1.
-
m:= infinity:
b:= proc(n, l) option remember; `if`(n=0, x^`if`(l[2]=m,
0, l[2]), add(b(n-j, sort([l[], j])[1..2])
*binomial(n-1, j-1)*(j-1)!, j=1..n))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..max(0, n-1)))(b(n, [m$2])):
seq(T(n), n=0..10); # Alois P. Heinz, Dec 07 2021
-
m = Infinity;
b[n_, l_] := b[n, l] = If[n == 0, x^If[l[[2]] == m, 0, l[[2]]], Sum[b[n-j, Sort[Append[l, j]][[1;;2]]]*Binomial[n - 1, j - 1]*(j - 1)!, {j, 1, n}]];
T[n_] := With[{p = b[n, {m, m}]}, Table[Coefficient[p, x, i], {i, 0, Max[0, n - 1]}]];
Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)
A344262
a(0)=1; for n>0, a(n) = a(n-1)*n+1 if n is even, (a(n-1)+1)*n otherwise.
Original entry on oeis.org
1, 2, 5, 18, 73, 370, 2221, 15554, 124433, 1119906, 11199061, 123189682, 1478276185, 19217590418, 269046265853, 4035693987810, 64571103804961, 1097708764684354, 19758757764318373, 375416397522049106, 7508327950440982121, 157674886959260624562
Offset: 0
a(0) = 1;
a(1) = (a(0)+1)*1 = (1+1)*1 = 2;
a(2) = (a(1)*2)+1 = (2*2)+1 = 5;
a(3) = (a(2)+1)*3 = (5+1)*3 = 18;
a(4) = (a(3)*4)+1 = (18*4)+1 = 73;
a(5) = (a(4)+1)*5 = (73+1)*5 = 370.
-
a:= proc(n) a(n):= n*a(n-1) + n^(n mod 2) end: a(0):= 1:
seq(a(n), n=0..22); # Alois P. Heinz, May 14 2021
-
a[1] = 1; a[n_] := a[n] = If[OddQ[n], (n - 1)*a[n - 1] + 1, (n - 1)*(a[n - 1] + 1)]; Array[a, 25] (* Amiram Eldar, May 13 2021 *)
A212291
Number of permutations of n elements with at most one fixed point.
Original entry on oeis.org
1, 1, 1, 5, 17, 89, 529, 3709, 29665, 266993, 2669921, 29369141, 352429681, 4581585865, 64142202097, 962133031469, 15394128503489, 261700184559329, 4710603322067905, 89501463119290213, 1790029262385804241, 37590614510101889081, 826993519222241559761
Offset: 0
-
b:= proc(n) b(n):= `if` (n<1, 1, n*b(n-1)+(-1)^(n)) end:
a:= n-> b(n) +n*b(n-1):
seq(a(n), n=0..30); # Alois P. Heinz, Jun 17 2012
-
nn=20; Range[0,nn]! CoefficientList[Series[(1+x)Exp[-x]/(1-x),{x,0,nn}],x] (* Geoffrey Critzer, Sep 27 2013 *)
Table[(-1)^n (HypergeometricPFQ[{1, -n}, {}, 1] - n HypergeometricPFQ[{1, 1 - n}, {}, 1]), {n, 20}] (* Eric W. Weisstein, Jun 14 2017 *)
Table[2 Subfactorial[n] - (-1)^n, {n, 20}] (* Eric W. Weisstein, Dec 30 2017 *)
-
d(n)=if(n,round(n!/exp(1)),1)
a(n)=if(n,n*d(n-1))+d(n)
-
my(x='x+O('x^25)); Vec(serlaplace((1+x)/(1-x)*exp(-x))) \\ Joerg Arndt, Jun 04 2023
A344317
a(n) = n*a(n-1) + n^(1+n mod 2), a(0) = 1.
Original entry on oeis.org
1, 2, 6, 19, 80, 401, 2412, 16885, 135088, 1215793, 12157940, 133737341, 1604848104, 20863025353, 292082354956, 4381235324341, 70099765189472, 1191696008221025, 21450528147978468, 407560034811590893, 8151200696231817880, 171175214620868175481
Offset: 0
A344419
a(n) = n*a(n-1) + n^(n mod 2), a(0) = 0.
Original entry on oeis.org
0, 1, 3, 12, 49, 250, 1501, 10514, 84113, 757026, 7570261, 83272882, 999274585, 12990569618, 181867974653, 2728019619810, 43648313916961, 742021336588354, 13356384058590373, 253771297113217106, 5075425942264342121, 106583944787551184562, 2344846785326126060365
Offset: 0
A161130
Sum of the differences between the largest and the smallest fixed points over all non-derangement permutations of {1,2,...,n}.
Original entry on oeis.org
0, 0, 1, 2, 13, 74, 523, 4178, 37609, 376082, 4136911, 49642922, 645357997, 9035011946, 135525179203, 2168402867234, 36862848742993, 663531277373858, 12607094270103319, 252141885402066362, 5294979593443393621
Offset: 0
a(3)=2 because the non-derangements of {1,2,3} are 1'23', 1'32, 213', and 32'1 with differences between the largest and smallest fixed points (marked) equal to 2, 0, 0, and 0, respectively.
a(4)=13 because the non-derangements of {1,2,3,4} are 1'234', 1'2'43, 1'423, 1'324', 1'342, 1'43'2, 413'2, 3124', 213'4', 42'13, 2314', 243'1, 42'3'1, 32'14', and 32'41 with differences between the largest and smallest fixed points (marked) equal to 3, 1, 0, 3, 0, 2, 0, 0, 1, 0, 0, 0, 1, 2, and 0, respectively.
-
G := (exp(-x)*(1+x+x^2)-1)/(1-x)^2: Gser := series(G, x = 0, 25): seq(factorial(n)*coeff(Gser, x, n), n = 0 .. 22);
-
CoefficientList[Series[(E^(-x)*(1+x+x^2)-1)/(1-x)^2, {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 20 2012 *)
A208956
Triangular array read by rows. T(n,k) is the number of n-permutations that have at least k fixed points with n >= 1 and 1 <= k <= n.
Original entry on oeis.org
1, 1, 1, 4, 1, 1, 15, 7, 1, 1, 76, 31, 11, 1, 1, 455, 191, 56, 16, 1, 1, 3186, 1331, 407, 92, 22, 1, 1, 25487, 10655, 3235, 771, 141, 29, 1, 1, 229384, 95887, 29143, 6883, 1339, 205, 37, 1, 1, 2293839, 958879, 291394, 68914, 13264, 2176, 286, 46, 1, 1
Offset: 1
Triangle begins:
1;
1, 1;
4, 1, 1;
15, 7, 1, 1;
76, 31, 11, 1, 1;
455, 191, 56, 16, 1, 1;
3186, 1331, 407, 92, 22, 1, 1;
...
-
b:= proc(n) b(n):= `if`(n<2, 1-n, (n-1)*(b(n-1)+b(n-2))) end:
T:= (n, k)-> add(binomial(n, i)*b(n-i), i=k..n):
seq(seq(T(n,k), k=1..n), n=1..12); # Alois P. Heinz, Apr 22 2013
-
f[list_] := Select[list,#>0&]; Map[f,Transpose[Table[nn=10; d=Exp[-x]/(1-x); p=1/(1-x); s=Sum[x^i/i!,{i,0,n}]; Drop[Range[0,nn]! CoefficientList[Series[p-s d, {x,0,nn}], x], 1], {n,0,9}]]]//Flatten
A344418
a(n) = n*a(n-1) + n^(1+n mod 2), a(0) = 0.
Original entry on oeis.org
0, 1, 4, 13, 56, 281, 1692, 11845, 94768, 852913, 8529140, 93820541, 1125846504, 14636004553, 204904063756, 3073560956341, 49176975301472, 836008580125025, 15048154442250468, 285914934402758893, 5718298688055177880, 120084272449158735481, 2641853993881492180604
Offset: 0
Showing 1-9 of 9 results.
Comments