A346077
a(n) = 1 + Sum_{k=1..n-5} a(k) * a(n-k-5).
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 8, 12, 18, 26, 36, 49, 69, 101, 150, 221, 320, 460, 667, 981, 1456, 2161, 3191, 4698, 6932, 10283, 15324, 22870, 34103, 50813, 75770, 113229, 169590, 254340, 381579, 572537, 859511, 1291681, 1943489, 2926980, 4410709, 6649220, 10028570
Offset: 0
-
a[n_] := a[n] = 1 + Sum[a[k] a[n - k - 5], {k, 1, n - 5}]; Table[a[n], {n, 0, 47}]
nmax = 47; A[] = 0; Do[A[x] = 1/(1 - x) + x^5 A[x] (A[x] - 1) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
-
@CachedFunction
def a(n): # a = A346077
if (n<6): return 1
else: return 1 + sum(a(k)*a(n-k-5) for k in range(1,n-4))
[a(n) for n in range(51)] # G. C. Greubel, Nov 27 2022
A377441
Square array T(n, k) read by rising antidiagonals. Row n has the ordinary generating function (-(n*x^3-(n+1)*x^2+x) + sqrt((n*x^3-(n+1)*x^2+x)^2 - 4*(x^3-x^2)*((n+1)*x^2-x)))/(2*(x^3-x^2)).
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 1, 1, 2, 5, 1, 1, 2, 6, 14, 1, 1, 2, 7, 21, 42, 1, 1, 2, 8, 30, 78, 132, 1, 1, 2, 9, 41, 136, 299, 429, 1, 1, 2, 10, 54, 222, 630, 1172, 1430, 1, 1, 2, 11, 69, 342, 1221, 2959, 4677, 4862, 1, 1, 2, 12, 86, 502, 2192, 6774, 14058, 18947, 16796, 1, 1, 2, 13, 105, 708, 3687, 14129, 37853, 67472, 77746, 58786, 1, 1, 2, 14, 126, 966, 5874, 27184
Offset: 0
The array begins:
[0] 1, 1, 2, 5, 14, 42, 132, 429, 1430, ... = A000108
[1] 1, 1, 2, 6, 21, 78, 299, 1172, 4677, ... = A254316
[2] 1, 1, 2, 7, 30, 136, 630, 2959, 14058, ...
[3] 1, 1, 2, 8, 41, 222, 1221, 6774, 37853, ...
[4] 1, 1, 2, 9, 54, 342, 2192, 14129, 91494, ...
[5] 1, 1, 2, 10, 69, 502, 3687, 27184, 201045, ...
Cf.
A000012 (Hankel transform of row 0),
A006720 (Hankel transform of row 1).
Cf.
A330025 (Hankel transform of row -1),
A328380 (Hankel transform of row -2).
A105849
Row sums of number triangle A105848.
Original entry on oeis.org
1, 3, 9, 28, 91, 308, 1079, 3888, 14332, 53810, 205075, 791250, 3084504, 12129506, 48056095, 191633546, 768535768, 3097705378, 12541851048, 50983349848, 208003171266, 851412895348, 3495527318559, 14390543072502, 59393240482618
Offset: 0
A272794
The numbers of closed simply typable lambda terms of natural size n.
Original entry on oeis.org
0, 0, 1, 1, 2, 5, 13, 27, 74, 198, 508, 1371, 3809, 10477, 29116, 82419, 233748, 666201, 1914668, 5528622, 16019330, 46642245, 136326126, 399652720, 1175422931, 3467251920, 10258152021
Offset: 0
- Maciej Bendkowski, Katarzyna Grygiel, Pierre Lescanne, Marek Zaionc, A natural counting of Lambda terms, arXiv:1506.02367 [cs.LO], 2015.
- Maciej Bendkowski, Katarzyna Grygiel, Pierre Lescanne, Marek Zaionc, A Natural Counting of Lambda Terms, SOFSEM 2016: 183-194
- Maciej Bendkowski, K Grygiel, P Tarau, Random generation of closed simply-typed lambda-terms: a synergy between logic programming and Boltzmann samplers, arXiv preprint arXiv:1612.07682, 2016
A275057
Numbers of closed lambda terms of natural size n.
Original entry on oeis.org
0, 0, 1, 1, 3, 6, 17, 41, 116, 313, 895, 2550, 7450, 21881, 65168, 195370, 591007, 1798718, 5510023, 16966529, 52506837, 163200904, 509323732, 1595311747, 5013746254, 15805787496, 49969942138, 158396065350, 503317495573, 1602973785463, 5116010587910, 16360492172347
Offset: 0
- Pierre Lescanne, Table of n, a(n) for n = 0..299
- Maciej Bendkowski, Katarzyna Grygiel, Pierre Lescanne, Marek Zaionc, A Natural Counting of Lambda Terms, SOFSEM 2016: 183-194.
- Maciej Bendkowski, K Grygiel, P Tarau, Random generation of closed simply-typed lambda-terms: a synergy between logic programming and Boltzmann samplers, arXiv preprint arXiv:1612.07682 [cs.LO], 2016-2017.
-
L[0, ] = 0; L[n, m_] := L[n, m] = Sum[L[k, m]*L[n-k-1, m], {k, 0, n-1}] + L[n-1, m+1] + Boole[m >= n];
a[n_] := L[n, 0];
Table[a[n], {n, 0, 31}] (* Jean-François Alcover, May 23 2017 *)
A377442
Square array read by rising antidiagonals: T(n, k) = A377441(-n, k), an extension of A377441 into the domain of negative n.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 1, 1, 2, 5, 1, 1, 2, 4, 14, 1, 1, 2, 3, 9, 42, 1, 1, 2, 2, 6, 22, 132, 1, 1, 2, 1, 5, 12, 57, 429, 1, 1, 2, 0, 6, 6, 26, 154, 1430, 1, 1, 2, -1, 9, -2, 15, 59, 429, 4862, 1, 1, 2, -2, 14, -18, 24, 24, 138, 1223, 16796, 1, 1, 2, -3, 21, -48, 77, -23, 53, 332, 3550, 58786, 1, 1, 2, -4, 30, -98, 222, -226, 102, 107, 814, 10455, 208012, 1, 1, 2
Offset: 0
The array begins:
[ 0] 1, 1, 2, 5, 14, 42, 132, 429, 1430, ... = A000108
[-1] 1, 1, 2, 4, 9, 22, 57, 154, 429, ... = A105633
[-2] 1, 1, 2, 3, 6, 12, 26, 59, 138, ... = A152172
[-3] 1, 1, 2, 2, 5, 6, 15, 24, 53, ...
[-4] 1, 1, 2, 1, 6, -2, 24, -23, 102, ...
[-5] 1, 1, 2, 0, 9, -18, 77, -226, 765, ...
[-6] 1, 1, 2, -1, 14, -48, 222, -921, 3914, ...
[-7] 1, 1, 2, -2, 21, -98, 531, -2756, 14373, ...
Row index written as [m] is corresponding to A377441(m, k).
Cf.
A377441 (The main entry for this sequence).
Cf.
A000012 (Hankel transform of row 0),
A006720 (Hankel transform of row 1).
Cf.
A330025 (Hankel transform of row -1),
A328380 (Hankel transform of row -2).
A274490
Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n starting with k columns of length 1 (n>=2, k>=0).
Original entry on oeis.org
0, 1, 1, 0, 1, 3, 1, 0, 1, 8, 3, 1, 0, 1, 22, 8, 3, 1, 0, 1, 62, 22, 8, 3, 1, 0, 1, 178, 62, 22, 8, 3, 1, 0, 1, 519, 178, 62, 22, 8, 3, 1, 0, 1, 1533, 519, 178, 62, 22, 8, 3, 1, 0, 1, 4578, 1533, 519, 178, 62, 22, 8, 3, 1, 0, 1, 13800, 4578, 1533, 519, 178, 62, 22, 8, 3, 1, 0, 1
Offset: 2
Row 4 is 3,1,0,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1], [1,2], [2,1], [2,2], [3] and, clearly, they start with 3, 1, 0, 0, 0 columns of length 1.
Triangle starts
0,1;
1,0,1;
3,1,0,1;
8,3,1,0,1;
22,8,3,1,0,1
-
G := (1-3*z+z^2+2*t*z^3-z^3-(1-z)*sqrt((1-z)*(1-3*z-z^2-z^3)))/(2*z*(1-t*z)): Gser := simplify(series(G, z = 0, 22)): for n from 2 to 18 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 2 to 18 do seq(coeff(P[n], t, k), k = 0 .. n-1) end do; # yields sequence in triangular form
-
nmax = 12;
g = (1 - 3z + z^2 + 2t z^3 - z^3 - (1-z) Sqrt[(1-z)(1 - 3z - z^2 - z^3)])/ (2z (1 - t z));
cc = CoefficientList[g + O[z]^(nmax+1), z];
T[n_, k_] := Coefficient[cc[[n+1]], t, k];
Table[T[n, k], {n, 2, nmax}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Jul 25 2018 *)
A294450
The numbers of plain simply typable lambda terms of natural size n.
Original entry on oeis.org
0, 1, 2, 3, 8, 17, 42, 106, 287, 747, 2069, 5732, 16012, 45283, 129232, 370761, 1069972
Offset: 0
- Maciej Bendkowski, Katarzyna Grygiel, Pierre Lescanne, Marek Zaionc, A natural counting of Lambda terms, arXiv:1506.02367 [cs.LO], 2015.
- Maciej Bendkowski, Katarzyna Grygiel, Pierre Lescanne, Marek Zaionc, A Natural Counting of Lambda Terms, SOFSEM 2016: 183-194.
- Maciej Bendkowski, K. Grygiel, P. Tarau, Random generation of closed simply-typed lambda-terms: a synergy between logic programming and Boltzmann samplers, arXiv preprint arXiv:1612.07682 [cs.LO], 2016-2017.
Comments