Original entry on oeis.org
1, 1, -2, -8, -32, -128, 1024, 16384, 262144, 4194304, -134217728, -8589934592, -549755813888, -35184372088832, 4503599627370496, 1152921504606846976, 295147905179352825856, 75557863725914323419136, -38685626227668133590597632, -39614081257132168796771975168
Offset: 0
-
[(-2)^Floor(Binomial(n+1,2)/2): n in [0..50]]; // G. C. Greubel, May 03 2018
-
Table[(-2)^Floor[Binomial[n + 1, 2]/2], {n, 0, 50}] (* G. C. Greubel, May 03 2018 *)
a[ n_] := (-2)^Quotient[n (n + 1), 4]; (* Michael Somos, Mar 14 2020 *)
-
for(n=0, 50, print1((-2)^floor(binomial(n+1,2)/2), ", ")) \\ G. C. Greubel, May 03 2018
Original entry on oeis.org
1, 0, -1, -2, -8, 0, 128, 1024, 16384, 0, -4194304, -134217728, -8589934592, 0, 35184372088832, 4503599627370496, 1152921504606846976, 0, -75557863725914323419136, -38685626227668133590597632
Offset: 0
-
R:= RealField(); [Round(2^Floor(Binomial(n,2)/2)*((Sqrt(2)/2 -1/2)*Sin(3*Pi(R)*n/4+Pi(R)/4)+(Sqrt(2)/2+1/2)*Cos(Pi(R)*n/4+Pi(R)/4))): n in [0..50]]; // G. C. Greubel, May 03 2018
-
Table[Round[2^Floor[Binomial[n, 2]/2]*((Sqrt[2]-1)*Sin[(3*n+1)*Pi/4]/2 + (Sqrt[2]+1)*Cos[(n+1)*Pi/4]/2)], {n, 0, 50}] (* G. C. Greubel, May 03 2018 *)
a[ n_] := -Sign[Mod[n - 1, 4]]*(-1)^Quotient[n - 1, 4]*2^Quotient[n (n - 1), 4]; (* Michael Somos, Mar 14 2020 *)
-
for(n=0,50, print1(round(2^floor(binomial(n,2)/2)*((sqrt(2)-1)*sin((3*n+1)*Pi/4)/2 +(sqrt(2)+1)*cos((n+1)*Pi/4)/2)), ", ")) \\ G. C. Greubel, May 03 2018
-
A160636(n)=if(n%4!=1,(-1)^((n+2)\4)<<(binomial(n,2)\2),0) \\ M. F. Hasler, May 09 2018
Comment with an incorrect formula deleted by
M. F. Hasler, May 09 2018
A114465
Number of Dyck paths of semilength n having no ascents of length 2 that start at an odd level.
Original entry on oeis.org
1, 1, 2, 5, 13, 36, 105, 317, 982, 3105, 9981, 32520, 107157, 356481, 1195662, 4038909, 13728369, 46919812, 161143157, 555857157, 1924956954, 6689953057, 23325404153, 81567552320, 286009944649, 1005371062561, 3542175587306
Offset: 0
a(4)=13 because among the 14 Dyck paths of semilength 4 only UUD(UU)DDD has an ascent of length 2 that starts at an odd level (shown between parentheses).
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Jean-Luc Baril and Paul Barry, Two kinds of partial Motzkin paths with air pockets, arXiv:2212.12404 [math.CO], 2022.
- Jean-Luc Baril, Daniela Colmenares, José L. Ramírez, Emmanuel D. Silva, Lina M. Simbaqueba, and Diana A. Toquica, Consecutive pattern-avoidance in Catalan words according to the last symbol, Univ. Bourgogne (France 2023).
- Jean-Luc Baril, Rigoberto Flórez, and José L. Ramírez, Counting symmetric and asymmetric peaks in motzkin paths with air pockets, Univ. Bourgogne (France, 2023).
-
g:=-1/2/z/(1+z^2-z)*(z^2-1+sqrt((z^2+1)*(z^2-4*z+1))): gser:=series(g,z=0,33): 1,seq(coeff(gser,z^n),n=1..30);
-
CoefficientList[Series[(1-x^2-Sqrt[(1+x^2)*(1-4*x+x^2)])/(2*x*(1-x+x^2)), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 20 2014 *)
-
Vec((1 - x^2 - sqrt((1+x^2)*(1-4*x+x^2)))/(2*x*(1-x+x^2)) + O(x^50)) \\ G. C. Greubel, Jan 28 2017
A114462
Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k ascents of length 2 starting at an even level (0<=k<=floor(n/2)).
Original entry on oeis.org
1, 1, 1, 1, 2, 3, 6, 7, 1, 18, 19, 5, 54, 59, 18, 1, 166, 191, 65, 7, 522, 631, 242, 34, 1, 1670, 2123, 906, 154, 9, 5418, 7247, 3395, 680, 55, 1, 17786, 25011, 12746, 2932, 300, 11, 58974, 87071, 47931, 12414, 1540, 81, 1, 197226, 305275, 180439, 51878, 7552
Offset: 0
T(4,1) = 7 because we have (UU)DDUDUD, UD(UU)DDUD, UDUD(UU)DD, (UU)DUDDUD,
UD(UU)DUDD, (UU)DUDUDD and (UU)DUUDDD, where U=(1,1), D=(1,-1) (the ascents of length 2 starting at an even level are shown between parentheses; note that the last path has an ascent of length 2 that starts at an odd level).
Triangle starts:
1;
1;
1, 1;
2, 3;
6, 7, 1;
18, 19, 5;
54, 59, 18, 1;
-
G:= 1/2/z*(3*z^2+2*z^3*t+1-z^3*t^2-3*z^2*t-z^3+t*z-z -sqrt(1+20*z^3*t-18*z^5*t^2+15*z^4*t^2+18*z^5*t+6*z^5*t^3-2*z^4*t^3-12*z^2*t -12*z^3 -6*z-24*z^4*t-8*z^3*t^2+z^6-6*z^5+11*z^4 +z^2*t^2+6*z^6*t^2 -4*z^6*t^3 -4*z^6*t+z^6*t^4+2*t*z +11*z^2)): Gser:=simplify(series(G,z=0,17)): P[0]:=1: for n from 1 to 14 do P[n]:=coeff(Gser,z^n) od: for n from 0 to 14 do seq(coeff(t*P[n],t^j),j=1..1+floor(n/2)) od; # yields sequence in triangular form
# second Maple program:
b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0, `if`(x=0,
`if`(t=2, z, 1), expand(b(x-1, y-1, min(3, t+1))+
`if`(t=2 and irem(y, 2)=0, z, 1)*b(x-1, y+1, 0))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0$2)):
seq(T(n), n=0..14); # Alois P. Heinz, Mar 12 2014
-
b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x==0, If[t==2, z, 1], Expand[ b[x-1, y-1, Min[3, t+1]] + If[t==2 && Mod[y, 2]==0, z, 1]*b[x-1, y+1, 0]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 0]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Mar 31 2015, after Alois P. Heinz *)
A114463
Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k ascents of length 2 starting at an odd level (0<=k<=floor(n/2)-1 for n>=2; k=0 for n=0,1).
Original entry on oeis.org
1, 1, 2, 5, 13, 1, 36, 6, 105, 26, 1, 317, 104, 8, 982, 402, 45, 1, 3105, 1522, 225, 10, 9981, 5693, 1052, 69, 1, 32520, 21144, 4698, 412, 12, 107157, 78188, 20319, 2249, 98, 1, 356481, 288340, 85864, 11522, 679, 14, 1195662, 1061520, 356535, 56360, 4230
Offset: 0
T(5,1) = 6 because we have UUD(UU)DUDDD, UUD(UU)DDUDD, UUD(UU)DDDUD,
UDUUD(UU)DDD, UUDUD(UU)DDD and UUUDD(UU)DDD, where U=(1,1), D=(1,-1) (the ascents of length 2 starting at an odd level are shown between parentheses; note that the fourth path has an ascent of length 2 that starts at an even level).
Triangle starts:
: 0 : 1;
: 1 : 1;
: 2 : 2;
: 3 : 5;
: 4 : 13, 1;
: 5 : 36, 6;
: 6 : 105, 26, 1;
: 7 : 317, 104, 8;
: 8 : 982, 402, 45, 1;
: 9 : 3105, 1522, 225, 10;
: 10 : 9981, 5693, 1052, 69, 1;
-
G:=-1/2*(1-z^2+z^2*t-sqrt((z^2*t-z^2+4*z-1)*(z^2*t-z^2-1)))/z/(-z^2+z^2*t+z-z*t-1): Gser:=simplify(series(G,z=0,18)): P[0]:=1: for n from 1 to 15 do P[n]:=coeff(Gser,z^n) od: 1; 1; for n from 2 to 15 do seq(coeff(t*P[n],t^j),j=1..floor(n/2)) od; # yields sequence in triangular form
# second Maple program:
b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
`if`(x=0, 1, expand(b(x-1, y+1, [2, 2, 2, 5, 2][t])
*`if`(t=5, z, 1) +b(x-1, y-1, [1, 3, 4, 1, 3][t]))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)):
seq(T(n), n=0..15); # Alois P. Heinz, Jun 10 2014
-
b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x==0, 1, Expand[b[x-1, y+1, {2, 2, 2, 5, 2}[[t]]]*If[t==5, z, 1] + b[x-1, y-1, {1, 3, 4, 1, 3}[[t]]]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 1]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Mar 31 2015, after Alois P. Heinz *)
Showing 1-5 of 5 results.
Comments