A114320
Triangle T(n,k) = number of permutations of n elements with k 2-cycles.
Original entry on oeis.org
1, 1, 1, 1, 3, 3, 15, 6, 3, 75, 30, 15, 435, 225, 45, 15, 3045, 1575, 315, 105, 24465, 12180, 3150, 420, 105, 220185, 109620, 28350, 3780, 945, 2200905, 1100925, 274050, 47250, 4725, 945, 24209955, 12110175, 3014550, 519750, 51975, 10395, 290529855
Offset: 0
T(3,1) = 3 because we have (1)(23), (12)(3) and (13)(2).
Triangle begins:
1;
1;
1, 1;
3, 3;
15, 6, 3;
75, 30, 15;
435, 225, 45, 15;
...
-
G:= exp((y-1)*x^2/2)/(1-x): Gser:= simplify(series(G,x=0,15)): P[0]:=1: for n from 1 to 12 do P[n]:= n!*coeff(Gser,x^n) od: for n from 0 to 12 do seq(coeff(y*P[n], y^j), j=1..1+floor(n/2)) od; # yields sequence in triangular form - Emeric Deutsch, Feb 17 2006
-
d = Exp[-x^2/2!]/(1 - x);f[list_] := Select[list, # > 0 &]; Flatten[Map[f, Transpose[Table[Range[0, 10]!CoefficientList[Series[x^(2 k)/(2^k k!) d, {x, 0, 10}], x], {k, 0, 5}]]]] (* Geoffrey Critzer, Nov 29 2011 *)
A218796
Triangular array read by rows: T(n,k) is the number of compositions of n that have exactly k 3's; n>=0, 0<=k<=floor(n/3).
Original entry on oeis.org
1, 1, 2, 3, 1, 6, 2, 11, 5, 21, 10, 1, 39, 22, 3, 73, 46, 9, 136, 97, 22, 1, 254, 200, 54, 4, 474, 410, 126, 14, 885, 832, 290, 40, 1, 1652, 1679, 651, 109, 5, 3084, 3368, 1440, 280, 20, 5757, 6725, 3138, 698, 65, 1, 10747, 13370, 6762, 1688, 195, 6, 20062, 26483, 14424, 3994, 546, 27
Offset: 0
1;
1;
2;
3, 1;
6, 2;
11, 5;
21, 10, 1;
39, 22, 3;
73, 46, 9;
136, 97, 22, 1;
254, 200, 54, 4;
474, 410, 126, 14;
885, 832, 290, 40, 1;
1652, 1679, 651, 109, 5;
3084, 3368, 1440, 280, 20;
5757, 6725, 3138, 698, 65, 1;
-
T:= proc(n) option remember; local j; if n=0 then 1
else []; for j to n do zip((x, y)-> x+y, %,
[`if`(j=3, 0, [][]), T(n-j)], 0) od; %[] fi
end:
seq (T(n), n=0..25); # Alois P. Heinz, Nov 05 2012
-
nn=15;f[list_]:=Select[list,#>0&];Map[f,CoefficientList[Series[1/(1-(x/(1-x)-x^3+y x^3)),{x,0,nn}],{x,y}]]//Grid
A120924
Triangle read by rows: T(n,k) is the number of ternary words of length n on {0,1,2}, having k isolated 0's (n >= 0, k >= 0).
Original entry on oeis.org
1, 2, 1, 5, 4, 13, 12, 2, 33, 36, 12, 83, 108, 48, 4, 209, 316, 172, 32, 527, 904, 588, 160, 8, 1329, 2548, 1932, 672, 80, 3351, 7104, 6140, 2592, 480, 16, 8449, 19628, 19020, 9440, 2320, 192, 21303, 53816, 57756, 32896, 10000, 1344, 32, 53713, 146596
Offset: 0
T(2,0)=5 because we have 00,11,12,21 and 22; T(2,1)=4 because we have 01,02,10 and 20; T(3,2)=2 because we have 010 and 020.
Triangle starts:
1;
2, 1;
5, 4;
13, 12, 2;
33, 36, 12;
83, 108, 48, 4;
-
G:=(1-(1-t)*z*(1-z))/(1-3*z+2*(1-t)*z^2*(1-z)): Gser:=simplify(series(G,z=0,15)): P[0]:=1: for n from 1 to 13 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 13 do seq(coeff(P[n],t,j),j=0..ceil(n/2)) od; # yields sequence in triangular form
A120925
Number of ternary words on {0,1,2} having no isolated 0's.
Original entry on oeis.org
1, 2, 5, 13, 33, 83, 209, 527, 1329, 3351, 8449, 21303, 53713, 135431, 341473, 860983, 2170865, 5473575, 13800961, 34797463, 87737617, 221219847, 557779233, 1406373239, 3546000945, 8940814823, 22543189057, 56839939415, 143315069777
Offset: 0
a(2)=5 because we have 00,11,12,21 and 22.
- Michael De Vlieger, Table of n, a(n) for n = 0..2490
- D. Birmajer, J. B. Gil, and M. D. Weiner, On the Enumeration of Restricted Words over a Finite Alphabet, J. Int. Seq. 19 (2016) # 16.1.3, example 11.
- Maksym Druchok, Volodymyr Krasnov, Taras Krokhmalskii, and Oleg Derzhko, One-dimensionally confined ammonia molecules: A theoretical study, arXiv:2307.06186 [cond-mat.stat-mech], 2023. See p. 5.
- Index entries for linear recurrences with constant coefficients, signature (3,-2,2).
-
a[0]:=1:a[1]:=2:a[2]:=5: for n from 3 to 32 do a[n]:=3*a[n-1]-2*a[n-2]+2*a[n-3] od: seq(a[n],n=0..32);
-
nn=20;a=x^2/(1-x);CoefficientList[Series[(a+1)/(1-(2x a)/(1-2x))/(1-2x),{x,0,nn}],x] (* Geoffrey Critzer, Jan 13 2013 *)
LinearRecurrence[{3,-2,2},{1,2,5},30] (* Harvey P. Dale, Nov 16 2024 *)
A296559
Triangle read by rows: T(n,k) is the number of compositions of n having k parts equal to 1 or 2 (0<=k<=n).
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 1, 0, 2, 1, 1, 2, 1, 3, 1, 1, 4, 3, 3, 4, 1, 2, 4, 9, 5, 6, 5, 1, 3, 7, 12, 16, 9, 10, 6, 1, 4, 13, 18, 28, 26, 16, 15, 7, 1, 6, 19, 36, 42, 55, 41, 27, 21, 8, 1, 9, 29, 60, 82, 90, 97, 64, 43, 28, 9, 1, 13, 47, 94, 152, 170, 177, 160, 99, 65, 36, 10, 1, 19, 73, 158, 252, 335, 333, 323, 253, 151, 94, 45, 11, 1
Offset: 0
T(3,2) = 2 because we have [1,2],[2,1].
T(6,3) = 5 because we have [2,2,2],[1,1,1,3],[1,1,3,1],[1,3,1,1],[3,1,1,1].
Triangle begins:
1,
0, 1,
0, 1, 1,
1, 0, 2, 1,
1, 2, 1, 3, 1,
1, 4, 3, 3, 4, 1,
2, 4, 9, 5, 6, 5, 1,
3, 7, 12, 16, 9, 10, 6, 1,
4, 13, 18, 28, 26, 16, 15, 7, 1,
...
-
g := (1-x)/(1-(1+t)*x-(1-t)*x^3): gser := simplify(series(g, x = 0, 17)): for n from 0 to 15 do p[n] := sort(expand(coeff(gser, x, n))) end do: for n from 0 to 15 do seq(coeff(p[n], t, j), j = 0 .. n) end do; # yields sequence in triangular form
-
nmax = 12;
s = Series[(1-x)/(1 - (1+t) x - (1-t) x^3), {x, 0, nmax}, {t, 0, nmax}];
T[n_, k_] := SeriesCoefficient[s, {x, 0, n}, {t, 0, k}];
Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 16 2017 *)
Showing 1-5 of 5 results.
Comments