A113682
Expansion of 2/(sqrt(1-2*x-3*x^2)*(1+x+sqrt(1-2*x-3*x^2))).
Original entry on oeis.org
1, 1, 4, 9, 26, 70, 197, 553, 1570, 4476, 12827, 36894, 106471, 308113, 893804, 2598313, 7567466, 22076404, 64498427, 188689684, 552675365, 1620567763, 4756614062, 13974168190, 41088418151, 120906613075, 356035078102
Offset: 0
-
[(Evaluate(GegenbauerPolynomial(n+1, -n-1), -1/2) + (-1)^n)/2: n in [0..40]]; // G. C. Greubel, Apr 04 2024
-
ex[x_]:=Module[{sx=Sqrt[1-2x-3x^2]},2/(sx (1+x+sx))]; CoefficientList[ Series[ ex[x],{x,0,40}],x] (* Harvey P. Dale, May 28 2012 *)
Flatten[{1, Table[Coefficient[Sum[(1 + x + x^2)^k, {k, 0, n}], x^n], {n, 1, 30}]}] (* Vaclav Kotesovec, Jan 08 2016 *)
-
makelist((ultraspherical(n+1,-n-1,-1/2)+(-1)^n)/2,n,0,12); /* Emanuele Munarini, Dec 20 2016 */
-
x='x+O('x^50); Vec(2/(sqrt(1-2*x-3*x^2)*(1+x+sqrt(1-2*x-3*x^2)))) \\ G. C. Greubel, Feb 28 2017
-
[(gegenbauer(n+1,-n-1,-1/2) +(-1)^n)/2 for n in range(41)] # G. C. Greubel, Apr 04 2024
A076540
Number of branches in all ordered trees with n edges.
Original entry on oeis.org
1, 3, 11, 41, 154, 582, 2211, 8437, 32318, 124202, 478686, 1849498, 7161556, 27784460, 107980515, 420300045, 1638238710, 6393535170, 24980504010, 97704407790, 382509199020, 1498824792660, 5877754713870, 23067328421826, 90590960500524, 356002519839652
Offset: 1
a(3)=11 because the five ordered trees with 3 edges have 1+3+2+2+3 = 11 branches altogether.
- Michael De Vlieger, Table of n, a(n) for n = 1..1664
- Ayomikun Adeniran and Lara Pudwell, Pattern avoidance in parking functions, Enumer. Comb. Appl. 3:3 (2023), Article S2R17.
- J. Riordan, Enumeration of plane trees by branches and endpoints, J. Combinat. Theory, Ser A, 19, 214-222, 1975.
- Lin Yang and Shengliang Yang, Protected Branches in Ordered Trees, J. Math. Study (2023) Vol. 56, No. 1, 1-17.
-
[Binomial(2*n,n)+Binomial(2*n,n-1)+Binomial(2*n,n-2): n in [0..30]]; // Vincenzo Librandi, Jun 17 2015
-
Table[Binomial[2 n, n] + Binomial[2 n, n-1] + Binomial[2 n, n-2], {n, 0, 30}] (* Vincenzo Librandi, Jun 17 2015 *)
-
vector(30, n, binomial(2*n-1,n-2)+binomial(2*n-2,n-1)) \\ Michel Marcus, Jun 17 2015
A025178
First differences of the central trinomial coefficients A002426.
Original entry on oeis.org
0, 2, 4, 12, 32, 90, 252, 714, 2032, 5814, 16700, 48136, 139152, 403286, 1171380, 3409020, 9938304, 29017878, 84844044, 248382516, 727971360, 2135784798, 6272092596, 18435108258, 54228499920, 159636389850, 470256930052, 1386170197704
Offset: 1
-
a := n -> 2*(n-1)*hypergeom([1-n/2, 3/2-n/2], [2], 4):
seq(simplify(a(n)), n=1..28); # Peter Luschny, Oct 29 2015
-
Rest[Differences[CoefficientList[Series[x/Sqrt[1-2x-3x^2],{x,0,30}],x]]] (* Harvey P. Dale, Aug 22 2011 *)
Differences[Table[Hypergeometric2F1[(1-n)/2,1-n/2,1,4],{n,1,29}]] (* Peter Luschny, Nov 03 2015 *)
-
a(n) = sum(k=1, n\2, binomial(n-1,2*k-1)*binomial(2*k,k)); \\ Altug Alkan, Oct 29 2015
-
def a():
b, c, n = 0, 2, 2
yield b
while True:
yield c
b, c = c, ((2*n-1)*c+3*(n-1)*b)*n//((n+1)*(n-1))
n += 1
A025178 = a()
print([next(A025178) for in (1..20)]) # _Peter Luschny, Nov 04 2015
New name based on a comment by
T. D. Noe, Mar 16 2005, offset set to 1 and a(1) = 0 prepended by
Peter Luschny, Nov 04 2015
A178834
a(n) counts anti-chains of size two in "0,1,2" Motzkin trees on n edges.
Original entry on oeis.org
0, 0, 1, 5, 23, 91, 341, 1221, 4249, 14465, 48442, 160134, 523872, 1699252, 5472713, 17520217, 55801733, 176942269, 558906164, 1759436704, 5522119250, 17285351782, 53977433618, 168194390290, 523076690018, 1623869984706
Offset: 0
For n = 3, we have a(3) = 5 because there are 5 two-element anti-chains on "0,1,2" Motzkin trees on 3 edges.
-
m:=30; R:=PowerSeriesRing(Rationals(), m); [0,0] cat Coefficients(R!( (1-x-Sqrt(1-2*x-3*x^2))^2/(4*x^2*Sqrt(1-2*x-3*x^2)^3) )); // G. C. Greubel, Jan 21 2019
-
M:= (1-z -Sqrt[1-2*z-3*z^2])/(2*z^2); T:= 1/Sqrt[1-2*z-3*z^2]; CoefficientList[Series[z^2*M^2*T^3, {z, 0, 30}], z] (* G. C. Greubel, Jan 21 2019 *)
-
z='z+O('z^33); M=(1-z-sqrt(1-2*z-3*z^2))/(2*z^2); T=1/sqrt(1-2*z-3*z^2); v=Vec(z^2*M^2*T^3+'tmp); v[1]=0; v
-
((1-x-sqrt(1-2*x-3*x^2))^2/(4*x^2*sqrt(1-2*x-3*x^2)^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 21 2019
A372014
T(n,k) is the total number of levels in all Motzkin paths of length n containing exactly k path nodes; triangle T(n,k), n>=0, 1<=k<=n+1, read by rows.
Original entry on oeis.org
1, 0, 1, 1, 1, 1, 2, 2, 2, 1, 4, 6, 4, 3, 1, 8, 14, 12, 7, 4, 1, 18, 32, 33, 21, 11, 5, 1, 44, 74, 84, 64, 34, 16, 6, 1, 113, 180, 208, 181, 111, 52, 22, 7, 1, 296, 457, 520, 485, 344, 179, 76, 29, 8, 1, 782, 1195, 1334, 1273, 1000, 599, 274, 107, 37, 9, 1
Offset: 0
In the A001006(3) = 4 Motzkin paths of length 3 there are 2 levels with 1 node, 2 levels with 2 nodes, 2 levels with 3 nodes, and 1 level with 4 nodes.
2 _ 1 1
2 / \ 3 /\_ 3 _/\ 4 ___ .
So row 3 is [2, 2, 2, 1].
Triangle T(n,k) begins:
1;
0, 1;
1, 1, 1;
2, 2, 2, 1;
4, 6, 4, 3, 1;
8, 14, 12, 7, 4, 1;
18, 32, 33, 21, 11, 5, 1;
44, 74, 84, 64, 34, 16, 6, 1;
113, 180, 208, 181, 111, 52, 22, 7, 1;
296, 457, 520, 485, 344, 179, 76, 29, 8, 1;
782, 1195, 1334, 1273, 1000, 599, 274, 107, 37, 9, 1;
...
-
g:= proc(x, y, p) (h-> `if`(x=0, add(z^coeff(h, z, i)
, i=0..degree(h)), b(x, y, h)))(p+z^y) end:
b:= proc(x, y, p) option remember; `if`(y+2<=x, g(x-1, y+1, p), 0)
+`if`(y+1<=x, g(x-1, y, p), 0)+`if`(y>0, g(x-1, y-1, p), 0)
end:
T:= n-> (p-> seq(coeff(p, z, i), i=1..n+1))(g(n, 0$2)):
seq(T(n), n=0..10);
A115990
Riordan array (1/sqrt(1-2*x-3*x^2), (1-2*x-3*x^2)/(2*(1-3*x)) - sqrt(1-2*x-3*x^2)/2).
Original entry on oeis.org
1, 1, 1, 3, 2, 1, 7, 5, 3, 1, 19, 13, 8, 4, 1, 51, 35, 22, 12, 5, 1, 141, 96, 61, 35, 17, 6, 1, 393, 267, 171, 101, 53, 23, 7, 1, 1107, 750, 483, 291, 160, 77, 30, 8, 1, 3139, 2123, 1373, 839, 476, 244, 108, 38, 9, 1, 8953, 6046, 3923, 2423, 1406, 752, 360, 147, 47, 10
Offset: 0
Triangle begins
1;
1, 1;
3, 2, 1;
7, 5, 3, 1;
19, 13, 8, 4, 1;
51, 35, 22, 12, 5, 1;
141, 96, 61, 35, 17, 6, 1;
-
Flat(List([0..10], n-> List([0..n], k-> Sum([0..n], j-> Binomial(n-k, j-k)*Binomial(j, n-j)) ))); # G. C. Greubel, May 09 2019
-
[[(&+[Binomial(n-k, j-k)*Binomial(j, n-j): j in [0..n]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, May 09 2019
-
A115990 := proc(n,k)
add(binomial(n-k,j-k)*binomial(j,n-j),j=0..n) ;
end proc:
seq(seq(A115990(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Jun 25 2023
-
Table[Sum[ Binomial[n-k, j-k]*Binomial[j, n-j], {j, 0, n}], {n, 0, 10}, {k, 0, n} ] // Flatten (* G. C. Greubel, Mar 07 2017 *)
-
{T(n, k) = sum(j=0, n, binomial(n-k, j-k)*binomial(j, n-j))}; \\ G. C. Greubel, May 09 2019
-
[[sum(binomial(n-k, j-k)*binomial(j, n-j) for j in (0..n)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, May 09 2019
A128017
Expansion of (1+2x+x^2-x^3)/(1-x^2+x^4).
Original entry on oeis.org
1, 2, 2, 1, 1, -1, -1, -2, -2, -1, -1, 1, 1, 2, 2, 1, 1, -1, -1, -2, -2, -1, -1, 1, 1, 2, 2, 1, 1, -1, -1, -2, -2, -1, -1, 1, 1, 2, 2, 1, 1, -1, -1, -2, -2, -1, -1, 1, 1, 2, 2, 1, 1, -1, -1, -2, -2, -1, -1, 1, 1, 2, 2, 1, 1, -1, -1, -2, -2, -1, -1
Offset: 0
A005213
Number of symmetric, reduced unit interval schemes with n+1 intervals (n>=1).
Original entry on oeis.org
1, 0, 1, 1, 3, 2, 7, 6, 19, 16, 51, 45, 141, 126, 393, 357, 1107, 1016, 3139, 2907, 8953, 8350, 25653, 24068, 73789, 69576, 212941, 201643, 616227, 585690, 1787607, 1704510, 5196627, 4969152, 15134931, 14508939, 44152809, 42422022, 128996853
Offset: 0
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
G:=((1+2*z-z^2)/sqrt(1-2*z^2-3*z^4)-1)/(2*z): Gser:=series(G,z=0,40): 1,seq(coeff(Gser,z^n),n=1..38);
-
CoefficientList[Series[((1 + 2*z - z^2)/Sqrt[1 - 2*z^2 - 3*z^4] - 1)/(2*z), {z, 0, 50}], z] (* G. C. Greubel, Mar 02 2017 *)
-
x='x +O('x^50); Vec(((1+2*x-x^2)/sqrt(1-2*x^2-3*x^4)-1)/(2*x)) \\ G. C. Greubel, Mar 02 2017
A147657
a(1)=1, a(2)=2, thereafter (1, -2, 3, -4, 5, -6, ...) interleaved with (-2, 2, -2, 2, ...).
Original entry on oeis.org
1, 2, 1, -2, -2, 2, 3, -2, -4, 2, 5, -2, -6, 2, 7, -2, -8, 2, 9, -2, -10, 2, 11, -2, -12, 2, 13, -2, -14, 2, 15, -2, -16, 2, 17, -2, -18, 2, 19, -2, -20, 2, 21, -2, -22, 2, 23, -2, -24, 2, 25, -2, -26, 2, 27, -2, -28, 2, 29, -2, -30, 2, 31, -2, -32, 2, 33
Offset: 1
-
Join[{1,2}, LinearRecurrence[{0, -2, 0, -1}, {1, -2, -2, 2}, 65]] (* Georg Fischer, Nov 02 2021 *)
A147658
(1, 2, -4, 6, -8, ...) interleaved with (3, -3, 3, -3, 3, ...).
Original entry on oeis.org
1, 3, 2, -3, -4, 3, 6, -3, -8, 3, 10, -3, -12, 3, 14, -3, -16, 3, 18, -3, -20, 3, 22, -3, -24, 3, 26, -3, -28, 3, 30, -3, -32, 3, 34, -3, -36, 3, 38, -3, -40, 3, 42, -3, -44, 3, 46, -3, -48, 3, 50, -3, -52, 3, 54, -3, -56, 3, 58, -3, -60, 3, 62, -3, -64
Offset: 1
-
with(ListTools): Flatten([1, seq([(-1)^(k-1)*3, (-1)^(k-1)*2*k], k=1..32)]); # Georg Fischer, Nov 02 2021
Comments