A259356 Triangle T(n,k) read by rows: T(n,k) is the number of closed lambda-terms of size n with size 0 for the variables and k abstractions.
0, 0, 1, 0, 1, 2, 0, 2, 9, 3, 0, 5, 38, 35, 4, 0, 14, 181, 284, 95, 5, 0, 42, 938, 2225, 1320, 210, 6, 0, 132, 5210, 17816, 15810, 4596, 406, 7
Offset: 0
Examples
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)
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).