cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A238345 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n where the k-th part is the first occurrence of a largest part, n>=1, 1<=k<=n.

This page as a plain text file.
%I A238345 #30 Jan 12 2015 04:12:46
%S A238345 1,2,0,3,1,0,5,2,1,0,8,5,2,1,0,14,9,6,2,1,0,24,18,12,7,2,1,0,43,33,25,
%T A238345 16,8,2,1,0,77,62,49,35,21,9,2,1,0,140,115,95,73,49,27,10,2,1,0,256,
%U A238345 215,181,148,108,68,34,11,2,1,0,472,401,346,291,230,158,93,42,12,2,1,0,874,753,657,569,470,353,228,125,51,13,2,1,0
%N A238345 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n where the k-th part is the first occurrence of a largest part, n>=1, 1<=k<=n.
%C A238345 Column k=1: T(n,1) = A079500(n) = A007059(n+1).
%C A238345 Row sums are A011782.
%H A238345 Joerg Arndt and Alois P. Heinz, <a href="/A238345/b238345.txt">Rows n = 1..141, flattened</a>
%e A238345 Triangle starts:
%e A238345 01:     1;
%e A238345 02:     2,    0;
%e A238345 03:     3,    1,    0;
%e A238345 04:     5,    2,    1,    0;
%e A238345 05:     8,    5,    2,    1,    0;
%e A238345 06:    14,    9,    6,    2,    1,    0;
%e A238345 07:    24,   18,   12,    7,    2,    1,    0;
%e A238345 08:    43,   33,   25,   16,    8,    2,    1,   0;
%e A238345 09:    77,   62,   49,   35,   21,    9,    2,   1,   0;
%e A238345 10:   140,  115,   95,   73,   49,   27,   10,   2,   1,   0;
%e A238345 11:   256,  215,  181,  148,  108,   68,   34,  11,   2,   1,  0;
%e A238345 12:   472,  401,  346,  291,  230,  158,   93,  42,  12,   2,  1,  0;
%e A238345 13:   874,  753,  657,  569,  470,  353,  228, 125,  51,  13,  2,  1, 0;
%e A238345 14:  1628, 1416, 1250, 1102,  943,  753,  533, 324, 165,  61, 14,  2, 1, 0;
%e A238345 15:  3045, 2673, 2380, 2126, 1866, 1558, 1188, 791, 453, 214, 72, 15, 2, 1, 0;
%e A238345 ...
%p A238345 g:= proc(n, m) option remember; `if`(n=0, 1,
%p A238345        add(g(n-j, min(n-j, m)), j=1..min(n, m)))
%p A238345     end:
%p A238345 h:= proc(n, t, m) option remember; `if`(n=0, 0,
%p A238345       `if`(t=1, add(g(n-j, j), j=m+1..n),
%p A238345        add(h(n-j, t-1, max(m, j)), j=1..n)))
%p A238345     end:
%p A238345 T:= (n, k)-> h(n, k, 0):
%p A238345 seq(seq(T(n, k), k=1..n), n=1..15);
%t A238345 g[n_, m_] := g[n, m] = If[n == 0, 1, Sum[g[n-j, Min[n-j, m]], {j, 1, Min[n, m]}]]; h[n_, t_, m_] := h[n, t, m] = If[n == 0, 0, If[t == 1, Sum[g[n-j, j], {j, m+1, n}], Sum[h[n-j, t-1, Max[m, j]], {j, 1, n}]]]; T[n_, k_] := h[n, k, 0]; Table[Table[T[n, k], {k, 1, n}], {n, 1, 15}] // Flatten (* _Jean-François Alcover_, Jan 12 2015, translated from Maple *)
%K A238345 nonn,tabl
%O A238345 1,2
%A A238345 _Joerg Arndt_ and _Alois P. Heinz_, Feb 25 2014