A373752
a(n) = Sum_{k=0..n-2} A205497(n, k) * (1 - k mod 2) if n >= 2, a(0) = a(1) = 1.
Original entry on oeis.org
1, 1, 1, 1, 2, 8, 33, 136, 670, 3968, 25593, 176896, 1344154, 11184128, 99897361, 951878656, 9687175862, 104932671488, 1202872541673, 14544442556416, 185158504589938, 2475749026562048, 34676498435503489, 507711943253426176, 7757079744889072462, 123460740095103991808
Offset: 0
-
enum := L -> ListTools:-Enumerate(L):
seq(add(c[2]*irem(c[1], 2), c = enum([A205497row(n)])), n = 0..25);
A373753
a(n) = Sum_{k=0..n-2} A205497(n, k) * (k mod 2).
Original entry on oeis.org
0, 0, 0, 1, 3, 8, 28, 136, 715, 3968, 24928, 176896, 1358611, 11184128, 99463620, 951878656, 9704336283, 104932671488, 1202007133768, 14544442556416, 185212683647587, 2475749026562048, 34672375957634412, 507711943253426176, 7757454418668014443, 123460740095103991808
Offset: 0
-
enum := L -> ListTools:-Enumerate(L):
seq(add(c[2]*(1-irem(c[1], 2)), c = enum([A205497row(n)])), n = 0..25);
A373754
a(n) = A205497(2*n, n - 1). The central coefficients of the Eulerian zig-zag polynomials.
Original entry on oeis.org
1, 1, 3, 31, 623, 20641, 1019051, 70148989, 6421463423, 754405836811, 110644077164479, 19814920352425441, 4255291684449288503, 1079391696218976473971, 319292229636452654327115, 108942069149956119095870401, 42469095372194594340983910271, 18758916770545140042717283889713
Offset: 0
A373755
a(n) = A205497(n, floor((n - 1) / 2)). The middle coefficients of the Eulerian zig-zag polynomials.
Original entry on oeis.org
1, 1, 1, 1, 3, 7, 31, 109, 623, 2951, 20641, 123216, 1019051, 7349140, 70148989, 593513485, 6421463423, 62382094567, 754405836811, 8277393686747, 110644077164479, 1353422057172923, 19814920352425441, 267391099520321166, 4255291684449288503, 62800765220575811118
Offset: 0
-
1, 1, 1, seq(A205497row(n)[iquo(n, 2)], n = 3..25);
A205495
Convolution related to array A205497 and to generating functions for the rows of the array form of A050446.
Original entry on oeis.org
1, 46, 937, 12331, 123216, 1019051, 7349140, 47816612, 287357460, 1622135139, 8709442871, 44899559053, 223883501478, 1086005140508, 5148332487873, 23940669359515, 109535136537197, 494307574790201, 2204762394907238, 9736270202183689, 42629974672006973
Offset: 0
A205496
Convolution related to array A205497 and to generating functions for the rows of the array form of A050446.
Original entry on oeis.org
1, 79, 2475, 47191, 656683, 7349140, 70148989, 593513485, 4571277561, 32672880245, 219830952888, 1407595988962, 8650512982826, 51368774778763, 296342413123845, 1668132449230997, 9195464663247238, 49787415018534288, 265430586786327769
Offset: 0
A373572
Triangle read by rows: Coefficients of the polynomials P(n, x) * EZ(n, x), where P denote the signed Pascal polynomials and EZ the Eulerian zig-zag polynomials A205497.
Original entry on oeis.org
1, -1, 1, 1, -2, 1, -1, 2, 0, -2, 1, 1, -1, -5, 10, -5, -1, 1, -1, -2, 18, -26, 0, 26, -18, 2, 1, 1, 8, -38, 18, 117, -212, 117, 18, -38, 8, 1, -1, -19, 52, 143, -677, 818, 0, -818, 677, -143, -52, 19, 1, 1, 38, -6, -817, 2196, -722, -5071, 8762, -5071, -722, 2196, -817, -6, 38, 1
Offset: 0
Triangle starts:
[0] [1]
[1] [-1, 1]
[2] [ 1, -2, 1]
[3] [-1, 2, 0, -2, 1]
[4] [ 1, -1, -5, 10, -5, -1, 1]
[5] [-1, -2, 18, -26, 0, 26, -18, 2, 1]
[6] [ 1, 8, -38, 18, 117, -212, 117, 18, -38, 8, 1]
[7] [-1, -19, 52, 143, -677, 818, 0, -818, 677, -143, -52, 19, 1]
A350354
Number of up/down (or down/up) patterns of length n.
Original entry on oeis.org
1, 1, 1, 3, 11, 51, 281, 1809, 13293, 109899, 1009343, 10196895, 112375149, 1341625041, 17249416717, 237618939975, 3491542594727, 54510993341523, 901106621474801, 15723571927404189, 288804851413993941, 5569918636750820751, 112537773142244706427
Offset: 0
The a(0) = 1 through a(4) = 11 patterns:
() (1) (1,2) (1,2,1) (1,2,1,2)
(1,3,2) (1,2,1,3)
(2,3,1) (1,3,1,2)
(1,3,2,3)
(1,3,2,4)
(1,4,2,3)
(2,3,1,2)
(2,3,1,3)
(2,3,1,4)
(2,4,1,3)
(3,4,1,2)
This is the up/down (or down/up) case of
A345194.
A205497 are the Euler zig-zag polynomials.
A335515 counts patterns matching (1,2,3).
A349058 counts weakly alternating patterns.
A350252 counts non-alternating patterns.
-
# Using the recurrence by Kyle Petersen from A205497.
G := proc(n) option remember; local F;
if n = 0 then 1/(1 - q*x) else F := G(n - 1);
simplify((p/(p - q))*(subs({p = q, q = p}, F) - subs(p = q, F))) fi end:
A350354 := n -> 2^n*subs({p = 1, q = 1, x = 1/2}, G(n)*(1 - x)^(n + 1)):
seq(A350354(n), n = 0..22); # Peter Luschny, Jun 03 2024
-
allnorm[n_]:=If[n<=0,{{}},Function[s, Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
updoQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]>y[[m+1]],y[[m]]
-
F(p,x) = {sum(k=0, p, (-1)^((k+1)\2)*binomial((p+k)\2, k)*x^k)}
R(n,k) = {Vec(if(k==1, 0, F(k-2,-x)/F(k-1,x)-1) + x + O(x*x^n))}
seq(n)= {concat([1], sum(k=1, n, R(n, k)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)) ))} \\ Andrew Howroyd, Feb 04 2022
A205492
Expansion of (1-x^2-x^3-x^4+x^5)/((1-x)^3*(1-x-x^2)^2*(1-2*x-x^2+x^3)).
Original entry on oeis.org
1, 7, 31, 109, 334, 937, 2475, 6267, 15393, 36976, 87369, 203915, 471546, 1082849, 2473535, 5627684, 12765052, 28887838, 65260270, 147233926, 331842395, 747355066, 1682185342, 3784718431, 8512408455, 19141037360, 43032743620
Offset: 0
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- L. E. Jeffery, Unit-primitive matrices
- Index entries for linear recurrences with constant coefficients, signature (7,-17,12,15,-26,3,13,-5,-2,1).
-
R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x^2-x^3-x^4+x^5)/((1-x)^3*(1-x-x^2)^2*(1-2*x-x^2+ x^3)) )); // G. C. Greubel, Jan 04 2020
-
seq(coeff(series((1-x^2-x^3-x^4+x^5)/((1-x)^3*(1-x-x^2)^2*(1-2*x-x^2+ x^3)), x, n+1), x, n), n = 0..30); # G. C. Greubel, Jan 04 2020
-
LinearRecurrence[{7,-17,12,15,-26,3,13,-5,-2,1},{1,7,31,109,334,937,2475,6267, 15393,36976},30] (* Harvey P. Dale, Mar 26 2013 *)
CoefficientList[Series[(1-x^2-x^3-x^4+x^5)/((1-x)^3*(1-x-x^2)^2*(1-2*x-x^2+ x^3)), {x,0,30}], x] (* G. C. Greubel, Jan 04 2020 *)
-
my(x='x+O('x^30)); Vec((1-x^2-x^3-x^4+x^5)/((1-x)^3*(1-x-x^2)^2*(1-2*x-x^2+ x^3))) \\ G. C. Greubel, Jan 04 2020
-
def A205492_list(prec):
P. = PowerSeriesRing(ZZ, prec)
return P( (1-x^2-x^3-x^4+x^5)/((1-x)^3*(1-x-x^2)^2*(1-2*x-x^2+x^3)) ).list()
A205492_list(30) # G. C. Greubel, Jan 04 2020
A373434
Triangle read by rows: Coefficients of the Eulerian polynomials EC(n, x)*EZ(n, x), where EC denote the classical Eulerian and EZ the zig-zag Eulerian polynomials.
Original entry on oeis.org
1, 1, 1, 1, 1, 5, 5, 1, 1, 14, 45, 45, 14, 1, 1, 33, 255, 671, 671, 255, 33, 1, 1, 71, 1131, 6311, 14446, 14446, 6311, 1131, 71, 1, 1, 146, 4420, 46571, 206932, 427370, 427370, 206932, 46571, 4420, 146, 1, 1
Offset: 0
Triangle T(n, k) starts:
[0] 1;
[1] 1;
[2] 1, 1;
[3] 1, 5, 5, 1;
[4] 1, 14, 45, 45, 14, 1;
[5] 1, 33, 255, 671, 671, 255, 33, 1;
[6] 1, 71, 1131, 6311, 14446, 14446, 6311, 1131, 71, 1;
...
Written as polynomials P(n, x):
[0] 1;
[1] 1;
[2] 1 + x;
[3] 1 + 5*x + 5*x^2 + x^3;
[4] 1 + 14*x + 45*x^2 + 45*x^3 + 14*x^4 + x^5;
[5] 1 + 33*x + 255*x^2 + 671*x^3 + 671*x^4 + 255*x^5 + 33*x^6 + x^7;
...
P(3, x) = A205497(3, x) * A173018(3, x) = (1 + x) * (1 + 4*x + x^2) = 1 + 5*x + 5*x^2 + x^3.
-
# Using the recurrence by Kyle Petersen from A205497.
R := proc(n) option remember; local F; if n = 0 then 1/(1 - q*x) else F := R(n - 1); simplify(p/(p - q)*(subs({p = q, q = p}, F) - subs(p = q, F))) fi end:
EZ := (n, x) -> ifelse(n < 3, 1, expand(simplify(subs({p = 1, q = 1}, R(n))*(1 - x)^(n + 1)) / x^2)):
EC := (n, x) -> local k; simplify(add(combinat:-eulerian1(n, k)*x^k, k = 0..n)):
EZC := (n, x) -> expand(EZ(n, x) * EC(n, x)):
Trow := n -> local k; if n < 2 then [1] elif n = 2 then [1, 1] else [seq(coeff(EZC(n, x), x, k), k = 0..2*n-3)] fi:
seq(print(EZC(n, x)), n = 0..6); seq(print(Trow(n)), n = 0..6);
-
R[n_] := R[n] = Module[{F}, If[n == 0, 1/(1 - q*x), F = R[n - 1]; Simplify[p/(p - q)*(ReplaceAll[F, {p -> q, q -> p}] - ReplaceAll[F, p -> q])]]];
EZ[n_, x_] := If[n < 3, 1, Expand[Simplify[ReplaceAll[R[n], {p -> 1, q -> 1}]*(1 - x)^(n + 1)] / x^2]];
eulerian1[n_, k_] := If[n == 0, 1, Sum[(-1)^j*Binomial[n + 1, j]*(k + 1 - j)^n, {j, 0, k + 1}]];
EC[n_, x_] := Sum[eulerian1[n, k]*x^k, {k, 0, n}];
EZC [n_, x_] := Expand[EZ[n, x] * EC[n, x]];
Trow[n_] := CoefficientList[EZC[n, x], x];
Table[Trow[n], {n, 0, 8}] // Flatten (* Jean-François Alcover, Jun 07 2024, after Peter Luschny's Maple program *)
Comments