OFFSET
0,6
FORMULA
T(n,k) = T(n,k,0) where T(n,k,b) where n is size, k is number of abstractions, and b is number of free variables, T(0,0,b) = b, and T(n,k,b) = T(n-1,k-1,b+1) + Sum_{i=0..n-1} Sum_{j=0..k} T(i,j,b) * T(n-1-i,k-j,b).
T(n+1,1) = A000108(n).
EXAMPLE
In table format, the first few rows:
{0},
{0,1},
{0,1,2},
{0,2,9,3},
{0,5,38,35,4},
...
For n=3,k=2 we have the number of closed lambda terms of size three with exactly two abstractions, T(3,2,0) = 9:
\x.\y.x x
\x.\y.x y
\x.\y.y x
\x.\y.y y
(\x.x) (\y.y)
\x.(\y.y) x
\x.(\y.x) x
\x.x (\y.y)
\x.x (\y.x)
CROSSREFS
KEYWORD
AUTHOR
John Bodeen, Jun 24 2015
STATUS
approved