A300442 Number of binary strict trees of weight n.
1, 1, 1, 2, 3, 6, 10, 23, 46, 108, 231, 561, 1285, 3139, 7348, 18265, 43907, 109887, 267582, 675866, 1669909, 4238462, 10555192, 26955062, 67706032, 173591181, 438555624, 1129088048, 2869732770, 7410059898, 18911818801, 48986728672, 125562853003, 326011708368
Offset: 0
Keywords
Examples
The a(5) = 6 binary strict trees: 5, (41), (32), ((31)1), ((21)2), (((21)1)1). The a(6) = 10 binary strict trees: 6, (51), (42), ((41)1), ((32)1), ((31)2), (((31)1)1), (((21)2)1), (((21)1)2), ((((21)1)1)1).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
Maple
a:= proc(n) option remember; 1+add(a(j)*a(n-j), j=1..(n-1)/2) end: seq(a(n), n=0..40); # Alois P. Heinz, Mar 06 2018
-
Mathematica
k[n_]:=k[n]=1+Sum[Times@@k/@y,{y,Select[IntegerPartitions[n],Length[#]===2&&UnsameQ@@#&]}]; Array[k,40] (* Second program: *) a[n_] := a[n] = 1 + Sum[a[j]*a[n - j], {j, 1, (n - 1)/2}]; a /@ Range[0, 40] (* Jean-François Alcover, May 13 2021, after Alois P. Heinz *)
-
PARI
seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 + sum(k=1, (n-1)\2, v[k]*v[n-k])); concat([1], v)} \\ Andrew Howroyd, Aug 25 2018
Formula
a(n) = 1 + Sum_{x + y = n, 0 < x < y < n} a(x) * a(y).
Comments