A000449
Rencontres numbers: number of permutations of [n] with exactly 3 fixed points.
Original entry on oeis.org
1, 0, 10, 40, 315, 2464, 22260, 222480, 2447445, 29369120, 381798846, 5345183480, 80177752655, 1282844041920, 21808348713320, 392550276838944, 7458455259940905, 149169105198816960, 3132551209175157490, 68916126601853463240
Offset: 3
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 65.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
# with k fixed-points:
G:=exp(-z)*z^k/((1-z)*k!: Gser:=series(G,z,21):
for n from k to 20 do a(n)=n!*coeff(Gser,z,n): end do: # Paul Weisenhorn, May 30 2010
-
Table[Subfactorial[n - 3]*Binomial[n, 3], {n, 3, 22}] (* Zerinvary Lajos, Jul 10 2009 *)
-
my(x='x+O('x^66)); Vec( serlaplace(exp(-x)/(1-x)*(x^3/3!)) ) \\ Joerg Arndt, Feb 19 2014
-
A000449_list, m, x = [], 1, 0
for n in range(3,21):
x, m = x*n + m*(n*(n-1)*(n-2)//6), -m
A000449_list.append(x) # Chai Wah Wu, Sep 23 2014
A073107
Triangle T(n,k) read by rows, where e.g.f. for T(n,k) is exp((1+y)*x)/(1-x).
Original entry on oeis.org
1, 2, 1, 5, 4, 1, 16, 15, 6, 1, 65, 64, 30, 8, 1, 326, 325, 160, 50, 10, 1, 1957, 1956, 975, 320, 75, 12, 1, 13700, 13699, 6846, 2275, 560, 105, 14, 1, 109601, 109600, 54796, 18256, 4550, 896, 140, 16, 1, 986410, 986409, 493200, 164388, 41076, 8190, 1344, 180, 18, 1
Offset: 0
exp((1 + y)*x)/(1 - x) =
1 +
1/1! * (2 + y) * x +
1/2! * (5 + 4*y + y^2) * x^2 +
1/3! * (16 + 15*y + 6*y^2 + y^3) * x^3 +
1/4! * (65 + 64*y + 30*y^2 + 8*y^3 + y^4) * x^4 +
1/5! * (326 + 325*y + 160*y^2 + 50*y^3 + 10*y^4 + y^5) * x^5 + ...
Triangle starts:
[0] 1;
[1] 2, 1;
[2] 5, 4, 1;
[3] 16, 15, 6, 1;
[4] 65, 64, 30, 8, 1;
[5] 326, 325, 160, 50, 10, 1;
[6] 1957, 1956, 975, 320, 75, 12, 1;
[7] 13700, 13699, 6846, 2275, 560, 105, 14, 1;
-
T := (n, k) -> binomial(n,k)*KummerU(k-n, k-n, 1);
seq(seq(simplify(T(n, k)), k = 0..n), n=0..8); # Peter Luschny, Oct 16 2024
-
perm[m_List] := With[{v=Array[x,Length[m]]},Coefficient[Times@@(m.v),Times@@v]] ;
A[q_] := Array[KroneckerDelta[#1,#2] + 1&,{q,q}] ;
n = 1 ; Print[{1}]; While[n < 10, Print[Abs[CoefficientList[perm[A[n] - IdentityMatrix[n] * k], k]]]; n++] (* John M. Campbell, Jul 02 2012 *)
A073107[n_, k_] := If[n == k, 1, Floor[E*(n - k)!]*Binomial[n, k]];
Table[A073107[n, k], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Oct 16 2024 *)
-
def T(n, k):
return sum(binomial(j,k) * factorial(n) // factorial(j) for j in range(n+1))
for n in range(8): print([T(n, k) for k in range(n+1)])
# Peter Luschny, Oct 16 2024
A164863
Number of ways of placing n labeled balls into 9 indistinguishable boxes; word structures of length n using a 9-ary alphabet.
Original entry on oeis.org
1, 1, 2, 5, 15, 52, 203, 877, 4140, 21147, 115974, 678514, 4211825, 27602602, 190077045, 1368705291, 10254521370, 79527284317, 635182667816, 5199414528808, 43426867585575, 368654643520692, 3170300933550687, 27542984610086665, 241205285284001240
Offset: 0
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Joerg Arndt and N. J. A. Sloane, Counting Words that are in "Standard Order"
- Moreira, N.; Reis, R. "On the Density of Languages Representing Finite Set Partitions", Journal of Integer Sequences, Vol. 8 (2005), Article 05.2.8.
- Pierpaolo Natalini, Paolo Emilio Ricci, New Bell-Sheffer Polynomial Sets, Axioms 2018, 7(4), 71.
- Eric Weisstein's World of Mathematics, Set Partition
- Index entries for linear recurrences with constant coefficients, signature (37, -574, 4858, -24409, 74053, -131256, 122652, -45360).
Cf.
A000110,
A048993,
A008291,
A098825,
A000012,
A000079,
A007051,
A007581,
A124303,
A056272,
A056273,
A099262,
A099263,
A164864.
-
# first program:
a:= n-> ceil(103/560*2^n +53/864*3^n +11/720*4^n +5^n/320 +6^n/2160 +7^n/10080 +9^n/362880): seq(a(n), n=0..25);
# second program:
a:= n-> add(Stirling2(n, k), k=0..9): seq(a(n), n=0..25);
-
Table[Sum[StirlingS2[n, k], {k, 0, 9}], {n, 0, 30}] (* Robert A. Russell, Apr 25 2018 *)
A060008
a(n) = 9*binomial(n,4) = 3n*(n-1)*(n-2)*(n-3)/8.
Original entry on oeis.org
0, 0, 0, 0, 9, 45, 135, 315, 630, 1134, 1890, 2970, 4455, 6435, 9009, 12285, 16380, 21420, 27540, 34884, 43605, 53865, 65835, 79695, 95634, 113850, 134550, 157950, 184275, 213759, 246645, 283185, 323640, 368280, 417384, 471240, 530145, 594405
Offset: 0
a(6) = 135 since there are 15 ways to choose the four points that move and 9 ways to move them and 15*9 = 135.
For changing 0, 1, 2, 3, 4, 5, n-4, n elements see
A000012,
A000004,
A000217 (offset),
A007290,
A060008,
A060836,
A000475,
A000166. Also see
A000332,
A008290.
-
9*Binomial[Range[0,40],4] (* or *) LinearRecurrence[{5,-10,10,-5,1},{0,0,0,0,9},40] (* Harvey P. Dale, Jun 09 2014 *)
-
a(n) = { 3*n*(n - 1)*(n - 2)*(n - 3)/8 } \\ Harry J. Smith, Jul 01 2009
A129135
Number of permutations of [n] with exactly 5 fixed points.
Original entry on oeis.org
1, 0, 21, 112, 1134, 11088, 122430, 1468368, 19090071, 267258992, 4008887883, 64142201760, 1090417436108, 19627513841376, 372922762997772, 7458455259939936, 156627560458759005, 3445806330092671776, 79253545592131484497, 1902085094211155585424
Offset: 5
-
a:=n->sum((n-1)!*sum((-1)^k/(k-4)!, j=0..n-1), k=4..n-1)/5!: seq(a(n), n=5..24);
x:='x'; G(x):=exp(-x)/(1-x)*(x^5/5!): f[0]:=G(x): for n from 1 to 26 do f[n]:=diff(f[n-1], x) od: x:=0: seq(f[n], n=5..24); # Zerinvary Lajos, Apr 03 2009
a:= n-> simplify(pochhammer(6, n-5)*GAMMA(n-4, -1)*exp(-1)/GAMMA(n-4)):
seq(a(n), n = 5 .. 24); # Miles Wilson, Aug 04 2024
-
With[{nn=30},Drop[CoefficientList[Series[Exp[-x]/(1-x) x^5/5!,{x,0,nn}],x]Range[0,nn]!,5]] (* Harvey P. Dale, Jan 22 2013 *)
-
my(x='x+O('x^66)); Vec(serlaplace(exp(-x)/(1-x)*(x^5/5!))) \\ Joerg Arndt, Feb 17 2014
-
from sympy import binomial
A129135_list, m, x = [], 1, 0
for n in range(5,21):
x, m = x*n + m*binomial(n,5), -m
A129135_list.append(x) # Chai Wah Wu, Nov 01 2014
A320582
Number T(n,k) of permutations p of [n] such that |{ j : |p(j)-j| = 1 }| = k; triangle T(n,k), n >= 0, 0 <= k <= n, read by rows.
Original entry on oeis.org
1, 1, 0, 1, 0, 1, 2, 0, 4, 0, 5, 6, 10, 2, 1, 21, 36, 42, 12, 9, 0, 117, 226, 219, 104, 47, 6, 1, 792, 1568, 1472, 800, 328, 64, 16, 0, 6205, 12360, 11596, 6652, 2658, 688, 148, 12, 1, 55005, 109760, 103600, 60840, 24770, 7120, 1560, 200, 25, 0, 543597, 1085560, 1030649, 614420, 255830, 77732, 17750, 2876, 365, 20, 1
Offset: 0
T(4,0) = 5: 1234, 1432, 3214, 3412, 4231.
T(4,1) = 6: 2431, 3241, 3421, 4132, 4213, 4312.
T(4,2) = 10: 1243, 1324, 1342, 1423, 2134, 2314, 2413, 3124, 3142, 4321.
T(4,3) = 2: 2341, 4123.
T(4,4) = 1: 2143.
Triangle T(n,k) begins:
1;
1, 0;
1, 0, 1;
2, 0, 4, 0;
5, 6, 10, 2, 1;
21, 36, 42, 12, 9, 0;
117, 226, 219, 104, 47, 6, 1;
792, 1568, 1472, 800, 328, 64, 16, 0;
6205, 12360, 11596, 6652, 2658, 688, 148, 12, 1;
55005, 109760, 103600, 60840, 24770, 7120, 1560, 200, 25, 0;
...
-
b:= proc(s) option remember; expand((n-> `if`(n=0, 1, add(
`if`(abs(n-j)=1, x, 1)*b(s minus {j}), j=s)))(nops(s)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b({$1..n})):
seq(T(n), n=0..12);
-
b[s_] := b[s] = Expand[With[{n = Length[s]}, If[n==0, 1, Sum[
If[Abs[n-j]==1, x, 1]*b[s~Complement~{j}], {j, s}]]]];
T[n_] := PadRight[CoefficientList[b[Range[n]], x], n+1];
T /@ Range[0, 12] // Flatten (* Jean-François Alcover, Feb 09 2021, after Alois P. Heinz *)
A350212
Number T(n,k) of endofunctions on [n] with exactly k isolated fixed points; triangle T(n,k), n >= 0, 0 <= k <= n, read by rows.
Original entry on oeis.org
1, 0, 1, 3, 0, 1, 17, 9, 0, 1, 169, 68, 18, 0, 1, 2079, 845, 170, 30, 0, 1, 31261, 12474, 2535, 340, 45, 0, 1, 554483, 218827, 43659, 5915, 595, 63, 0, 1, 11336753, 4435864, 875308, 116424, 11830, 952, 84, 0, 1, 262517615, 102030777, 19961388, 2625924, 261954, 21294, 1428, 108, 0, 1
Offset: 0
T(3,1) = 9: 122, 133, 132, 121, 323, 321, 113, 223, 213.
Triangle T(n,k) begins:
1;
0, 1;
3, 0, 1;
17, 9, 0, 1;
169, 68, 18, 0, 1;
2079, 845, 170, 30, 0, 1;
31261, 12474, 2535, 340, 45, 0, 1;
554483, 218827, 43659, 5915, 595, 63, 0, 1;
11336753, 4435864, 875308, 116424, 11830, 952, 84, 0, 1;
...
-
g:= proc(n) option remember; add(n^(n-j)*(n-1)!/(n-j)!, j=1..n) end:
b:= proc(n, m) option remember; `if`(n=0, x^m, add(g(i)*
b(n-i, m+`if`(i=1, 1, 0))*binomial(n-1, i-1), i=1..n))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0)):
seq(T(n), n=0..10);
# second Maple program:
A350212 := (n,k)-> add((-1)^(j-k)*binomial(j,k)*binomial(n,j)*(n-j)^(n-j), j=0..n):
seq(print(seq(A350212(n, k), k=0..n)), n=0..9); # Mélika Tebni, Nov 24 2022
-
g[n_] := g[n] = Sum[n^(n - j)*(n - 1)!/(n - j)!, {j, 1, n}];
b[n_, m_] := b[n, m] = If[n == 0, x^m, Sum[g[i]*
b[n - i, m + If[i == 1, 1, 0]]*Binomial[n - 1, i - 1], {i, 1, n}]];
T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 0]];
Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Mar 11 2022, after Alois P. Heinz *)
A129218
Permutations with exactly 10 fixed points.
Original entry on oeis.org
1, 0, 66, 572, 9009, 132132, 2122120, 36056592, 649062414, 12332093488, 246642054516, 5179482792120, 113948622073286, 2620818306541512, 62899639358957544, 1572490983970669840, 40884765583242727575
Offset: 10
-
a:=n->sum(n!*sum((-1)^k/(k-9)!, j=0..n), k=9..n): seq(-a(n)/10!, n=9..27);
restart: G(x):=exp(-x)/(1-x)*(x^10/10!): f[0]:=G(x): for n from 1 to 26 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=10..26); # Zerinvary Lajos, Apr 03 2009
-
With[{nn=40}, Drop[CoefficientList[Series[Exp[-x]/(1 - x) x^10/10!, {x, 0, nn}], x]Range[0, nn]!, 10]] (* Vincenzo Librandi, Feb 19 2014 *)
-
x='x+O('x^66); Vec( serlaplace(exp(-x)/(1-x)*(x^9/9!)) ) \\ Joerg Arndt, Feb 19 2014
A060836
Number of permutations of n letters where exactly 5 change position.
Original entry on oeis.org
0, 0, 0, 0, 44, 264, 924, 2464, 5544, 11088, 20328, 34848, 56628, 88088, 132132, 192192, 272272, 376992, 511632, 682176, 895356, 1158696, 1480556, 1870176, 2337720, 2894320, 3552120, 4324320, 5225220, 6270264, 7476084, 8860544, 10442784, 12243264, 14283808, 16587648
Offset: 1
Robert Goodhand (rgoodhand(AT)hotmail.com), May 12 2001
a(8) = a(7) * 8/(8-5) = 924 * 8/3 = 2464.
For changing 0, 1, 2, 3, 4, 5, n-4, n elements see
A000012,
A000004,
A000217 (offset),
A007290,
A060008,
A060836,
A000475,
A000166. Also see
A000332,
A008290.
A129136
Permutations with exactly 6 fixed points.
Original entry on oeis.org
1, 0, 28, 168, 1890, 20328, 244860, 3181464, 44543499, 668147480, 10690367688, 181736238320, 3271252308324, 62153793831024, 1243075876659240, 26104593409789776, 574301055015449685, 13208924265355241808
Offset: 6
-
a:=n->sum(n!*sum((-1)^k/(k-5)!, j=0..n), k=5..n): seq(-a(n)/6!, n=5..24);
restart: G(x):=exp(-x)/(1-x)*(x^6/6!): f[0]:=G(x): for n from 1 to 26 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=6..23); # Zerinvary Lajos, Apr 03 2009
-
With[{nn=40}, Drop[CoefficientList[Series[Exp[-x]/(1 - x) x^6/6!, {x, 0, nn}], x]Range[0, nn]!, 6]] (* Vincenzo Librandi, Feb 19 2014 *)
-
x='x+O('x^66); Vec( serlaplace(exp(-x)/(1-x)*(x^6/6!)) ) \\ Joerg Arndt, Feb 19 2014
Comments