A220896 Number of closed lambda-terms of size n with at most 2 free de Bruijn indices.
2, 7, 41, 312, 2784, 27917, 307943, 3690055, 47635777, 658405747, 9695617821, 151488900012, 2502346785164, 43560247035581, 796828655891895, 15277217956632472, 306268455537216444, 6406216616616309707, 139535240869213561821, 3159084189417388736206
Offset: 0
Keywords
Links
- Katarzyna Grygiel and Pierre Lescanne, Counting and generating lambda-terms, arXiv preprint arXiv:1210.2610, 2012
Programs
-
Mathematica
T[0, m_] := m; T[n_, m_] := T[n, m] = T[n-1, m+1] + Sum[T[i, m] T[n-i-1, m], {i, 0, n-1}]; a[n_] := T[n, 2]; Table[a[n], {n, 0, 14}] (* Jean-François Alcover, May 23 2017 *)
Formula
Grygiel and Lescanne give a recurrence.
Extensions
More terms from Alois P. Heinz, May 23 2017