A356185
The difference between number of even and number of odd Grassmannian permutations of size n.
Original entry on oeis.org
1, 1, 0, 1, 0, 3, 2, 9, 8, 23, 22, 53, 52, 115, 114, 241, 240, 495, 494, 1005, 1004, 2027, 2026, 4073, 4072, 8167, 8166, 16357, 16356, 32739, 32738, 65505, 65504, 131039, 131038, 262109, 262108, 524251, 524250, 1048537, 1048536, 2097111, 2097110, 4194261, 4194260
Offset: 0
For n=3, 123, 231, 312 are even Grassmann permutations, and 132, 213 are the odd ones. Hence a(3) = 1.
- Juan B. Gil and Jessica A. Tomasko, Restricted Grassmannian permutations, arXiv:2112.03338 [math.CO], 2021.
- Juan B. Gil and Jessica A. Tomasko, Restricted Grassmannian permutations, Enum. Combin. Appl. 2 (2022), no. 4, Article #S4PP6.
- Index entries for linear recurrences with constant coefficients, signature (2,1,-4,2).
A077866
Expansion of (1-x)^(-1)/(1 - x - 2*x^2 + 2*x^3).
Original entry on oeis.org
1, 2, 5, 8, 15, 22, 37, 52, 83, 114, 177, 240, 367, 494, 749, 1004, 1515, 2026, 3049, 4072, 6119, 8166, 12261, 16356, 24547, 32738, 49121, 65504, 98271, 131038, 196573, 262108, 393179, 524250, 786393, 1048536, 1572823, 2097110, 3145685, 4194260, 6291411, 8388562
Offset: 0
G.f. = 1 + 2*x + 5*x^2 + 8*x^3 + 15*x^4 + 22*x^5 + 37*x^6 + ... - _Michael Somos_, Aug 11 2021
-
CoefficientList[Series[(1-x)^(-1)/(1-x-2x^2+2x^3),{x,0,50}],x] (* or *) LinearRecurrence[{2,1,-4,2},{1,2,5,8},50] (* Harvey P. Dale, Feb 16 2013 *)
-
Vec((1-x)^(-1)/(1-x-2*x^2+2*x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
A130102
E.g.f.: (e^x - x)^2.
Original entry on oeis.org
1, 0, 2, 2, 8, 22, 52, 114, 240, 494, 1004, 2026, 4072, 8166, 16356, 32738, 65504, 131038, 262108, 524250, 1048536, 2097110, 4194260, 8388562, 16777168, 33554382, 67108812, 134217674, 268435400, 536870854, 1073741764, 2147483586
Offset: 0
a(4) = 8 because there are 8 sequences on {0,1} such that neither 0 nor 1 occurs exactly once: {0,0,0,0}, {0,0,1,1}, {0,1,0,1}, {0,1,1,0}, {1,0,0,1}, {1,0,1,0}, {1,1,0,0}, {1,1,1,1}. - _Geoffrey Critzer_, Dec 03 2011
-
I:=[1, 0, 2, 2, 8, 22]; [n le 6 select I[n] else 4*Self(n-1)-5*Self(n-2)+2*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 28 2012
-
a=Exp[x]-x; Range[0,20]! CoefficientList[Series[a^2, {x,0,20}], x] (* Geoffrey Critzer, Dec 03 2011 *)
CoefficientList[Series[1+2*x^2-2*x^3/((2*x-1)*(x-1)^2),{x,0,40}],x] (* Vincenzo Librandi, Jun 28 2012 *)
A156901
Triangle formed by coefficients of the expansion of p(x, n), where p(x,n) = (1 + 2*x - x^2)^(n + 1)*Sum_{j >= 0} (j+1)^n*(-2*x + x^2)^j.
Original entry on oeis.org
1, 1, 1, -2, 1, 1, -8, 8, -4, 1, 1, -22, 55, -52, 23, -6, 1, 1, -52, 290, -472, 394, -188, 50, -8, 1, 1, -114, 1265, -3624, 4838, -3668, 1750, -536, 97, -10, 1, 1, -240, 4884, -24092, 49239, -56448, 40664, -19320, 6231, -1360, 180, -12, 1, 1, -494, 17419, -142124, 441625, -730898, 749723, -515944, 247067, -83122, 19673, -3244, 331, -14, 1
Offset: 0
Irregular triangle begins as:
1;
1;
1, -2, 1;
1, -8, 8, -4, 1;
1, -22, 55, -52, 23, -6, 1;
1, -52, 290, -472, 394, -188, 50, -8, 1;
1, -114, 1265, -3624, 4838, -3668, 1750, -536, 97, -10, 1;
1, -240, 4884, -24092, 49239, -56448, 40664, -19320, 6231, -1360, 180, -12, 1;
-
p[x_, n_]= (1+2*x-x^2)^(n+1)*Sum[(k+1)^n*(-2*x+x^2)^k, {k,0,Infinity}];
Table[CoefficientList[p[x, n], x], {n,0,10}]//Flatten
-
def T(n, k): return ( (1+2*x-x^2)^(n+1)*sum((j+1)^n*(x^2-2*x)^j for j in (0..2*n+1)) ).series(x, 2*n+2).list()[k]
flatten([1]+[[T(n, k) for k in (0..2*n-2)] for n in (1..12)]) # G. C. Greubel, Jan 07 2022
A222403
Triangle read by rows: left and right edges are A000217, interior entries are filled in using the Pascal triangle rule.
Original entry on oeis.org
0, 1, 1, 3, 2, 3, 6, 5, 5, 6, 10, 11, 10, 11, 10, 15, 21, 21, 21, 21, 15, 21, 36, 42, 42, 42, 36, 21, 28, 57, 78, 84, 84, 78, 57, 28, 36, 85, 135, 162, 168, 162, 135, 85, 36, 45, 121, 220, 297, 330, 330, 297, 220, 121, 45, 55, 166, 341, 517, 627, 660, 627, 517, 341, 166, 55
Offset: 0
Triangle begins:
0
1, 1
3, 2, 3
6, 5, 5, 6
10, 11, 10, 11, 10
15, 21, 21, 21, 21, 15
21, 36, 42, 42, 42, 36, 21
28, 57, 78, 84, 84, 78, 57, 28
...
-
d:=[seq(n*(n+1)/2,n=0..14)];
f:=proc(d) local T,M,n,i;
M:=nops(d);
T:=Array(0..M-1,0..M-1);
for n from 0 to M-1 do T[n,0]:=d[n+1]; T[n,n]:=d[n+1]; od:
for n from 2 to M-1 do
for i from 1 to n-1 do T[n,i]:=T[n-1,i-1]+T[n-1,i]; od: od:
lprint("triangle:");
for n from 0 to M-1 do lprint(seq(T[n,i],i=0..n)); od:
lprint("row sums:");
lprint([seq( add(T[i,j],j=0..i), i=0..M-1)]);
end;
f(d);
-
t[n_, n_] := n*(n+1)/2; t[n_, 0] := n*(n+1)/2; t[n_, k_] := t[n, k] = t[n-1, k-1] + t[n-1, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 20 2014 *)
A287416
Number T(n,k) of set partitions of [n] such that the maximal value of all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks equals k; triangle T(n,k), n>=0, 0<=k<=max(n-1,0), read by rows.
Original entry on oeis.org
1, 1, 0, 2, 0, 3, 2, 0, 4, 8, 3, 0, 5, 22, 19, 6, 0, 6, 52, 81, 48, 16, 0, 7, 114, 289, 267, 147, 53, 0, 8, 240, 941, 1250, 968, 529, 204, 0, 9, 494, 2894, 5310, 5469, 3919, 2174, 878, 0, 10, 1004, 8601, 21256, 28083, 25326, 17593, 9961, 4141
Offset: 0
T(4,1) = 4: 1234, 1|234, 1|2|34, 1|2|3|4.
T(4,2) = 8: 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 1|23|4, 1|24|3.
T(4,3) = 3: 123|4, 14|23, 14|2|3.
T(5,3) = 19: 1235|4, 123|45, 123|4|5, 125|34, 125|3|4, 134|25, 134|2|5, 13|24|5, 13|25|4, 145|23, 14|235, 14|23|5, 1|234|5, 145|2|3, 14|25|3, 14|2|35, 14|2|3|5, 1|25|34, 1|25|3|4.
Triangle T(n,k) begins:
1;
1;
0, 2;
0, 3, 2;
0, 4, 8, 3;
0, 5, 22, 19, 6;
0, 6, 52, 81, 48, 16;
0, 7, 114, 289, 267, 147, 53;
0, 8, 240, 941, 1250, 968, 529, 204;
...
-
b:= proc(n, k, l, t) option remember; `if`(n<1, 1, `if`(t-n>k, 0,
b(n-1, k, map(x-> `if`(x-n>=k, [][], x), [l[], n]), n)) +add(
b(n-1, k, sort(map(x-> `if`(x-n>=k, [][], x), subsop(j=n, l))),
`if`(t-n>k, infinity, t)), j=1..nops(l)))
end:
A:= (n, k)-> b(n, min(k, n-1), [], n):
T:= (n, k)-> A(n, k)-`if`(k=0, 0, A(n, k-1)):
seq(seq(T(n, k), k=0..max(n-1, 0)), n=0..12);
-
b[n_, k_, l_, t_] := b[n, k, l, t] = If[n < 1, 1, If[t - n > k, 0, b[n - 1, k, If[# - n >= k, Nothing, #]& /@ Append[l, n], n]] + Sum[b[n - 1, k, Sort[If[# - n >= k, Nothing, #]& /@ ReplacePart[l, j -> n]], If[t - n > k, Infinity, t]], {j, 1, Length[l]}]];
A[n_, k_] := b[n, Min[k, n - 1], {}, n];
T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];
Table[T[n, k], {n, 0, 12}, { k, 0, Max[n - 1, 0]}] // Flatten (* Jean-François Alcover, May 24 2018, translated from Maple *)
A061761
a(n) = 2^n + 2*n - 1.
Original entry on oeis.org
0, 3, 7, 13, 23, 41, 75, 141, 271, 529, 1043, 2069, 4119, 8217, 16411, 32797, 65567, 131105, 262179, 524325, 1048615, 2097193, 4194347, 8388653, 16777263, 33554481, 67108915, 134217781, 268435511, 536870969, 1073741883, 2147483709
Offset: 0
a(5) = 2^5 + 2*5 - 1 = 32 + 10 - 1 = 41. - _Michael B. Porter_, Aug 18 2016
A145654
Partial sums of A000918, starting from index 1.
Original entry on oeis.org
0, 2, 8, 22, 52, 114, 240, 494, 1004, 2026, 4072, 8166, 16356, 32738, 65504, 131038, 262108, 524250, 1048536, 2097110, 4194260, 8388562, 16777168, 33554382, 67108812, 134217674, 268435400, 536870854, 1073741764, 2147483586
Offset: 1
For n=7, a(7) = 6*2 + 5*2^2 + 4*2^3 + 3*2^4 + 2*2^5 + 1*2^6 = 240. - _Bruno Berselli_, Feb 10 2014
From _Bruno Berselli_, Jul 17 2018: (Start)
Row sums of the triangle:
0 ...................................... 0
1, 1 .................................. 2
3, 2, 3 .............................. 8
6, 5, 5, 6 .......................... 22
10, 11, 10, 11, 10 ...................... 52
15, 21, 21, 21, 21, 15 .................. 114
21, 36, 42, 42, 42, 36, 21 .............. 240
28, 57, 78, 84, 84, 78, 57, 28 .......... 494, etc.
(End)
-
a145654 n = a145654_list !! (n-1)
a145654_list = scanl1 (+) $ tail a000918_list
-- Reinhard Zumkeller, Nov 06 2013
-
Accumulate[2^Range[30] - 2] (* or *) LinearRecurrence[{4, -5, 2}, {0, 2, 8}, 30] (* Harvey P. Dale, Jul 15 2017 *)
A321280
Number T(n,k) of permutations p of [n] with exactly k descents such that the up-down signature of p has nonnegative partial sums; triangle T(n,k), n>=0, 0<=k<=max(0,floor((n-1)/2)), read by rows.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 8, 1, 22, 22, 1, 52, 172, 1, 114, 856, 604, 1, 240, 3488, 7296, 1, 494, 12746, 54746, 31238, 1, 1004, 43628, 330068, 518324, 1, 2026, 143244, 1756878, 5300418, 2620708, 1, 4072, 457536, 8641800, 43235304, 55717312, 1, 8166, 1434318, 40298572, 309074508, 728888188, 325024572
Offset: 0
Triangle T(n,k) begins:
1;
1;
1;
1, 2;
1, 8;
1, 22, 22;
1, 52, 172;
1, 114, 856, 604;
1, 240, 3488, 7296;
1, 494, 12746, 54746, 31238;
1, 1004, 43628, 330068, 518324;
1, 2026, 143244, 1756878, 5300418, 2620708;
1, 4072, 457536, 8641800, 43235304, 55717312;
1, 8166, 1434318, 40298572, 309074508, 728888188, 325024572;
1, 16356, 4438540, 180969752, 2026885824, 7589067592, 8460090160;
...
- Alois P. Heinz, Rows n = 0..100, flattened
- S. Spiro, Ballot Permutations, Odd Order Permutations, and a New Permutation Statistic, arXiv preprint arXiv:1810.00993 [math.CO], 2018.
- David G. L. Wang, T. Zhao, The peak and descent statistics over ballot permutations, arXiv:2009.05973 [math.CO], 2020.
-
b:= proc(u, o, c) option remember; `if`(c<0, 0, `if`(u+o=0, 1/x,
add(expand(x*b(u-j, o-1+j, c-1)), j=1..u)+
add(b(u+j-1, o-j, c+1), j=1..o)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(`if`(n=0, 1, b(n, 0, 1))):
seq(T(n), n=0..14);
-
b[u_, o_, c_] := b[u, o, c] = If[c < 0, 0, If[u + o == 0, 1/x, Sum[Expand[ x*b[u - j, o - 1 + j, c - 1]], {j, 1, u}] + Sum[b[u + j - 1, o - j, c + 1], {j, 1, o}]]];
T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ If[n == 0, 1, b[n, 0, 1]]];
Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Dec 08 2018, after Alois P. Heinz *)
A046740
Triangle of number of permutations of [n] with 0 successions, by number of rises.
Original entry on oeis.org
1, 1, 1, 2, 1, 8, 2, 1, 22, 28, 2, 1, 52, 182, 72, 2, 1, 114, 864, 974, 164, 2, 1, 240, 3474, 8444, 4174, 352, 2, 1, 494, 12660, 57194, 61464, 15782, 732, 2, 1, 1004, 43358, 332528, 660842, 373940, 55286, 1496, 2, 1, 2026, 142552, 1747558, 5814124
Offset: 1
Triangle begins:
1;
1;
1, 2;
1, 8, 2;
1, 22, 28, 2;
...
-
a[, 1] = 1; a[n, 2] := 2^n - 2*n; a[n_, r_] /; 1 <= r <= n-1 := a[n, r] = r*a[n-1, r] + (n-r)*a[n-1, r-1] + (n-2)*a[n-2, r-1]; a[, ] = 0;
row[1] = {{1}}; row[n_] := Table[a[n, r], {r, 1, n-1}];
Table[row[n], {n, 1, 11}] // Flatten (* Jean-François Alcover, Sep 07 2017 *)
Comments