A019497
Number of ternary search trees on n keys.
Original entry on oeis.org
1, 1, 1, 3, 6, 16, 42, 114, 322, 918, 2673, 7875, 23457, 70551, 213846, 652794, 2004864, 6190612, 19207416, 59850384, 187217679, 587689947, 1850692506, 5845013538, 18509607753, 58759391013, 186958014766, 596108115402, 1904387243796, 6095040222192, 19540540075824
Offset: 0
James Fill (jimfill(AT)jhu.edu)
-
A:= proc(n) option remember; if n=0 then 1 else convert(series(1+x+x^2*A(n-1)^3, x=0,n+1), polynom) fi end: a:= n-> coeff(A(n), x,n): seq(a(n), n=0..27); # Alois P. Heinz, Aug 22 2008
-
a[0] = 1; a[n_] := Sum[Binomial[1*(n-k), k]/(n-k)*Binomial[3*k, n-k-1], {k, 0, n-1}]; Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Apr 07 2015, after Paul D. Hanna *)
-
v=vector(50,j,1);for(n=3,50,A=sum(i=1,n,sum(j=1,n,sum(k=1,n,if(i+j+k-n,0,v[i]*v[j]*v[k]))));v[n]=A);a(n)=v[n+1];
-
{a(n)= local(A); if(n<0, 0, A= 1+O(x); forstep(k= 1, n, 2, A= 1+x+x*x*A^3); polcoeff(A, n))} /* Michael Somos, Mar 29 2007 */
-
{a(n)= if(n<0, 0, (-1)^n* polcoeff( serreverse((1-sqrt(1-4*x+4*x^3+x^2*O(x^n)))/2), n+1))} /* Michael Somos, Mar 29 2007 */
-
a(n)=if(n==0,1,sum(k=0,n-1,binomial(1*(n-k),k)/(n-k)*binomial(3*k,n-k-1))) \\ Paul D. Hanna, Jun 16 2009
A056010
Number of words of length n in a simple grammar.
Original entry on oeis.org
1, 1, 3, 8, 23, 68, 207, 644, 2040, 6558, 21343, 70186, 232864, 778550, 2620459, 8872074, 30195288, 103246502, 354508628, 1221846856, 4225644866, 14659644348, 51002664023, 177909901566, 622093882290, 2180123564130, 7656055966092
Offset: 0
L(0) = 1, L(1) = e, L(2) = ee + ew + ns, L(3) = eee + ewe + nse + eew + eww + nsw + nes + ens.
G.f. = 1 + x + 3*x^2 + 8*x^3 + 23*x^4 + 68*x^5 + 207*x^6 + 644*x^7 + ...
-
CoefficientList[Series[(1 - 2 x - Sqrt[1 - 4 x + 4 x^3])/(2 x^2), {x, 0, 26}], x] (* Michael De Vlieger, Oct 30 2019 *)
a[ n_] := SeriesCoefficient[ (2 - 2*x)/(1 - 2*x + (1 - 4*x + 4*x^3)^(1/2)), {x, 0, n}]; (* Michael Somos, Oct 27 2024 *)
a[ n_] := If[ n<0, 0, SeriesCoefficient[Nest[(1 + x*#)^2 - x&, 1 + O[x], n], {x, 0, n}]]; (* Michael Somos, Oct 27 2024 *)
-
{a(n) = if( n<0, 0, polcoef( (1 - 2*x - sqrt( 1 - 4*x + 4*x^3 + x^3 * O(x^n)) ) / (2*x^2), n))};
-
{a(n) = if( n<0, 0, polcoef( (2 - 2*x)/(1 - 2*x + (1 - 4*x + 4*x^3 + x*O(x^n))^(1/2)), n))}; /* Michael Somos, Oct 27 2024 */
A160702
Sequence such that the Hankel transform of a(n+1) satisfies a generalized Somos-4 recurrence.
Original entry on oeis.org
1, 1, 1, 5, 19, 79, 333, 1441, 6351, 28451, 129185, 593373, 2752427, 12876343, 60684533, 287857209, 1373286375, 6584979659, 31719337353, 153416338549, 744777567043, 3627787084319
Offset: 0
- Vincenzo Librandi, Table of n, a(n) for n = 0..300
- Paul Barry, On the Hurwitz Transform of Sequences, Journal of Integer Sequences, Vol. 15 (2012), #12.8.7.
- Gouce Xin, Proof of the Somos-4 Hankel determinants conjecture, Advances in Applied Mathematics, Volume 42, Issue 2, February 2009, Pages 152-156.
-
CoefficientList[Series[1/4+(1-Sqrt[16*x^3+x^2-6*x+1])/(4*x),{x,0,20}],x] (* Vaclav Kotesovec, Nov 20 2012 *)
A157002
Transform of Catalan numbers whose Hankel transform gives the Somos-4 sequence.
Original entry on oeis.org
1, 0, 1, 2, 6, 17, 51, 156, 488, 1552, 5006, 16337, 53849, 179015, 599535, 2020924, 6851150, 23344138, 79902364, 274606264, 947240592, 3278404274, 11381240074, 39621423949, 138288477617, 483805404673, 1696318159457, 5959737806635
Offset: 0
G.f. = 1 + x^2 + 2*x^3 + 6*x^4 + 17*x^5 + 51*x^6 + 156*x^7 + 488*x^8 + ...
-
m:=30; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!( (1 -Sqrt(1-4*x*(1-x^2)))/(2*x*(1+x)) )); // G. C. Greubel, Feb 26 2019
-
CoefficientList[Series[(1-Sqrt[1-4x(1-x^2)])/(2x(1+x)), {x,0,30}], x] (* G. C. Greubel, Feb 26 2019 *)
-
{a(n) = if( n<0, -(-1)^n / 2 * (n<-1), polcoeff( (1 - sqrt(1 - 4*x * (1 - x^2) + x^2 * O(x^n))) / (2 * x * (1 + x)), n))}; /* Michael Somos, Feb 10 2015 */
-
((1-sqrt(1-4*x*(1-x^2)))/(2*x*(1+x))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 26 2019
A025268
a(n) = a(1)*a(n-1) + a(2)*a(n-2) + ...+ a(n-1)*a(1) for n >= 5, with initial values 1,1,1,1.
Original entry on oeis.org
1, 1, 1, 1, 4, 11, 32, 95, 284, 860, 2630, 8115, 25242, 79080, 249342, 790719, 2520546, 8072216, 25961150, 83814536, 271538192, 882527618, 2876712308, 9402284815, 30806948110, 101172278362, 332965892290, 1097990333320, 3627433618396
Offset: 1
-
Phi:=proc(t,u,M) local i,a; a:=Array(0..M);
for i from 0 to t-1 do a[i]:=u[i+1]; od:
for i from t to M do a[i]:=a[i-1]+add(a[j]*a[i-1-j],j=0..i-2); od:
[seq(a[i],i=0..M)]; end;
Phi(4,[1,1,1,1],30);
# N. J. A. Sloane, Oct 29 2008
-
nmax = 30; aa = ConstantArray[0,nmax]; aa[[1]] = 1; aa[[2]] = 1; aa[[3]] = 1; aa[[4]] = 1; Do[aa[[n]] = Sum[aa[[k]]*aa[[n-k]],{k,1,n-1}],{n,5,nmax}]; aa (* Vaclav Kotesovec, Jan 25 2015 *)
A157100
Transform of Catalan numbers whose Hankel transform satisfies the Somos-4 recurrence.
Original entry on oeis.org
1, 2, 3, 6, 14, 37, 105, 312, 956, 2996, 9554, 30897, 101083, 333947, 1112497, 3732956, 12605030, 42800318, 146046820, 500555448, 1722402304, 5948047170, 20607691518, 71610355541, 249520257107, 871614139397, 3051737703527
Offset: 0
-
a[n_]:= Sum[(-1)^Binomial[k, 2]*Binomial[n-k, Floor[k/2]]*CatalanNumber[n-k], {k,0,n}];
Table[a[n], {n, 0, 40}] (* G. C. Greubel, Jan 11 2022 *)
-
def A157100(n): return sum((-1)^binomial(k,2)*binomial(n-k, k//2)*catalan_number(n-k) for k in (0..n))
[A157100(n) for n in (0..40)] # G. C. Greubel, Jan 11 2022
A168151
Riordan array (1/u,(1-u)/2), u=sqrt(1-4x+4*x^3).
Original entry on oeis.org
1, 2, 1, 6, 3, 1, 18, 9, 4, 1, 58, 29, 13, 5, 1, 192, 96, 44, 18, 6, 1, 650, 325, 151, 64, 24, 7, 1, 2232, 1116, 524, 228, 90, 31, 8, 1, 7746, 3873, 1833, 813, 333, 123, 39, 9, 1, 27096, 13548, 6452, 2904, 1222, 473, 164, 48, 10, 1
Offset: 0
Triangle begins:
1
2 1
6 3 1
18 9 4 1
58 29 13 5 1
192 96 44 18 6 1
650 325 151 64 24 7 1
...
- Baccherini, D.; Merlini, D.; Sprugnoli, R. Binary words excluding a pattern and proper Riordan arrays. Discrete Math. 307 (2007), no. 9-10, 1021--1037. MR2292531 (2008a:05003). See Example 5.6. - N. J. A. Sloane, Mar 25 2014
A176703
Coefficients of a recursive polynomial based on Chaitin's S expressions: a(0)=1; a(1)=x; a(2)=1; a(n)=vector(a(n-1)).reverse(a(n-1)).
Original entry on oeis.org
1, 0, 1, 1, 0, 2, 0, 1, 4, 2, 2, 9, 8, 4, 2, 22, 24, 14, 8, 56, 70, 52, 24, 5, 146, 208, 176, 84, 30, 388, 624, 574, 320, 120, 14, 1048, 1876, 1868, 1184, 470, 112, 2869, 5648, 6088, 4236, 1900, 560, 42, 7942, 17040, 19804, 14928, 7560, 2492, 420, 22192, 51526, 64232
Offset: 0
{1},
{0, 1},
{1, 0},
{2, 0, 1},
{4, 2, 2},
{9, 8, 4, 2},
{22, 24, 14, 8},
{56, 70, 52, 24, 5},
{146, 208, 176, 84, 30},
{388, 624, 574, 320, 120, 14},
{1048, 1876, 1868, 1184, 470, 112},
{2869, 5648, 6088, 4236, 1900, 560, 42},
{7942, 17040, 19804, 14928, 7560, 2492, 420},
{22192, 51526, 64232, 52208, 29190, 10864, 2520, 132},
{62510, 156128, 207808, 181320, 110260, 46256, 12684, 1584},
{177308, 473952, 670966, 625408, 410400, 190932, 59976, 11088, 429}
- G. J. Chaitin, Algorithmic Information Theory, Cambridge Press, 1987, page 169
-
a[0] := 1; a[1] := x; a[2] = 1;
a[n_] := a[n] = Table[a[i], {i, 0, n - 1}].Table[a[n - 1 - i], {i, 0, n - 1}];
Table[ CoefficientList[a[n], x], {n, 0, 15}];
Flatten[%]
-
{T(n, k) = if( 2*k-1 > n, 0, polcoeff( polcoeff( ( 1 - sqrt( (1 - 2*x)^2 - 4*x^2 * (x + y - 2*x*y) + x^2*O(x^n))) / (2*x), n), k))} /* Michael Somos, Jan 09 2012 */
A367044
G.f. satisfies A(x) = 1 - x^2 + x*A(x)^3.
Original entry on oeis.org
1, 1, 2, 9, 40, 192, 963, 5000, 26649, 144990, 802023, 4497150, 25504380, 146037955, 843134220, 4902661503, 28686940053, 168785282241, 997968554037, 5926617173205, 35335723342962, 211433954924955, 1269252184538408, 7642065274626855, 46137678521488140
Offset: 0
-
a(n) = sum(k=0, n\2, (-1)^k*binomial(2*(n-2*k)+1, k)*binomial(3*(n-2*k), n-2*k)/(2*(n-2*k)+1));
A367045
G.f. satisfies A(x) = 1 - x^2 + x*A(x)^4.
Original entry on oeis.org
1, 1, 3, 18, 112, 755, 5348, 39302, 296916, 2291861, 17997052, 143319918, 1154728056, 9395809374, 77099733884, 637298480966, 5301568498768, 44351526986704, 372890978840156, 3149155955471690, 26702387443603200, 227238745573918511, 1940201017862028108
Offset: 0
-
a(n) = sum(k=0, n\2, (-1)^k*binomial(3*(n-2*k)+1, k)*binomial(4*(n-2*k), n-2*k)/(3*(n-2*k)+1));
Showing 1-10 of 10 results.
Comments