login
A318942
Triangle read by rows: T(n,k) = number of Dyck paths with n nodes and altitude k (1 <= k <= n).
5
1, 2, 1, 5, 4, 1, 13, 12, 6, 1, 34, 35, 21, 8, 1, 89, 99, 68, 32, 10, 1, 233, 274, 208, 114, 45, 12, 1, 610, 747, 612, 376, 175, 60, 14, 1, 1597, 2015, 1752, 1177, 620, 253, 77, 16, 1, 4181, 5394, 4916, 3549, 2062, 959, 350, 96, 18, 1, 10946, 14359, 13588, 10406, 6551, 3381, 1414, 468, 117, 20
OFFSET
1,2
LINKS
Czabarka, É., Flórez, R., Junes, L., & Ramírez, J. L. (2018). Enumerations of peaks and valleys on non-decreasing Dyck paths. Discrete Mathematics, 341(10), 2789-2807.
FORMULA
Czabarka et al. give a g.f. - N. J. A. Sloane, Apr 09 2019
EXAMPLE
Triangle begins:
1,
2,1,
5,4,1,
13,12,6,1,
34,35,21,8,1,
89,99,68,32,10,1,
233,274,208,114,45,12,1,
610,747,612,376,175,60,14,1,
1597,2015,1752,1177,620,253,77,16,1,
...
MAPLE
A318942 := proc(n, k) # Theorem 7 of Czabarka et al.
option remember;
if k = 1 then
combinat[fibonacci](2*n-1) ;
elif n =k then
1;
elif n = k+1 then
2*procname(n-1, k)+procname(n-1, k-1) ;
elif n >= k+2 then
2*procname(n-1, k)+procname(n-1, k-1)-procname(n-2, k-1)+combinat[fibonacci](2*n-2*k-2) ;
else
0 ;
end if;
end proc:
seq( seq(A318942(n, k), k=1..n), n=1..12 ) ; # R. J. Mathar, Apr 09 2019
MATHEMATICA
T[n_, k_] := T[n, k] = Which[k == 1, Fibonacci[2*n - 1], n == k, 1, n == k + 1, 2*T[n - 1, k] + T[n - 1, k - 1], n >= k + 2, 2*T[n - 1, k] + T[n - 1, k - 1] - T[n - 2, k - 1] + Fibonacci[2*n - 2*k - 2], True, 0];
Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Sep 25 2022, after R. J. Mathar *)
CROSSREFS
Col. 1 is alternate Fibonaccis, cols. 2, 3, 4 are A318941, A318943, A318944.
Row sums give A038731(n-1).
Sequence in context: A054456 A096164 A201166 * A188137 A201165 A171488
KEYWORD
nonn,tabl,easy
AUTHOR
N. J. A. Sloane, Sep 18 2018
STATUS
approved