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.

Previous Showing 21-23 of 23 results.

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.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

Column k=1: T(n,1) = A079500(n) = A007059(n+1).
Row sums are A011782.

Examples

			Triangle starts:
01:     1;
02:     2,    0;
03:     3,    1,    0;
04:     5,    2,    1,    0;
05:     8,    5,    2,    1,    0;
06:    14,    9,    6,    2,    1,    0;
07:    24,   18,   12,    7,    2,    1,    0;
08:    43,   33,   25,   16,    8,    2,    1,   0;
09:    77,   62,   49,   35,   21,    9,    2,   1,   0;
10:   140,  115,   95,   73,   49,   27,   10,   2,   1,   0;
11:   256,  215,  181,  148,  108,   68,   34,  11,   2,   1,  0;
12:   472,  401,  346,  291,  230,  158,   93,  42,  12,   2,  1,  0;
13:   874,  753,  657,  569,  470,  353,  228, 125,  51,  13,  2,  1, 0;
14:  1628, 1416, 1250, 1102,  943,  753,  533, 324, 165,  61, 14,  2, 1, 0;
15:  3045, 2673, 2380, 2126, 1866, 1558, 1188, 791, 453, 214, 72, 15, 2, 1, 0;
...
		

Programs

  • Maple
    g:= proc(n, m) option remember; `if`(n=0, 1,
           add(g(n-j, min(n-j, m)), j=1..min(n, m)))
        end:
    h:= proc(n, t, m) option remember; `if`(n=0, 0,
          `if`(t=1, add(g(n-j, j), j=m+1..n),
           add(h(n-j, t-1, max(m, j)), j=1..n)))
        end:
    T:= (n, k)-> h(n, k, 0):
    seq(seq(T(n, k), k=1..n), n=1..15);
  • Mathematica
    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 *)

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

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 5, 4, 1, 1, 8, 9, 8, 5, 1, 1, 14, 15, 15, 12, 6, 1, 1, 24, 27, 27, 24, 17, 7, 1, 1, 43, 47, 50, 46, 37, 23, 8, 1, 1, 77, 85, 90, 89, 75, 55, 30, 9, 1, 1, 140, 153, 165, 167, 152, 118, 79, 38, 10, 1, 1, 256, 279, 301, 313, 299, 250, 180, 110, 47, 11, 1, 1, 472, 511, 552, 582, 578, 516, 398, 267, 149, 57, 12, 1, 1
Offset: 1

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

Column k=1: T(n,1) = A079500(n-1) = A007059(n).
Row sums are A011782.

Examples

			Triangle starts:
01:  1,
02:  1, 1,
03:  2, 1, 1,
04:  3, 3, 1, 1,
05:  5, 5, 4, 1, 1,
06:  8, 9, 8, 5, 1, 1,
07:  14, 15, 15, 12, 6, 1, 1,
08:  24, 27, 27, 24, 17, 7, 1, 1,
09:  43, 47, 50, 46, 37, 23, 8, 1, 1,
10:  77, 85, 90, 89, 75, 55, 30, 9, 1, 1,
11:  140, 153, 165, 167, 152, 118, 79, 38, 10, 1, 1,
12:  256, 279, 301, 313, 299, 250, 180, 110, 47, 11, 1, 1,
13:  472, 511, 552, 582, 578, 516, 398, 267, 149, 57, 12, 1, 1,
...
		

A120643 Table T(n,k) = number of fractal initial sequences (where new values are successive integers) of length n whose last term is k.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 2, 1, 5, 4, 3, 3, 1, 8, 8, 5, 6, 4, 1, 14, 14, 10, 10, 10, 5, 1, 24, 25, 21, 16, 20, 15, 6, 1, 43, 43, 43, 28, 35, 35, 21, 7, 1, 77, 76, 83, 56, 57, 70, 56, 28, 8, 1, 140, 136, 153, 120, 93, 126, 126, 84, 36, 9, 1, 256, 248, 274, 256, 165, 211, 252, 210, 120, 45, 10, 1
Offset: 1

Views

Author

Keywords

Comments

A fractal sequence is one where, when the first instance of each integer is removed, the original sequence results. We require also that these first instances occur in order: 1,1,2,3 is OK, but 1,1,3,2 is not. A finite sequence is an initial subsequence of (uncountably many) fractal sequences when the result after removing the first instance of each number is an initial subsequence. The total number of such sequences of length n is 2^{n-1}. At each index after the first, the next value can be either a new value or a uniquely determined repetition of some earlier value. Conjecture: column 1 of this array is A007059.

Examples

			For n = 3, the 4 sequences are 1,1,1; 1,1,2; 1,2,1; and 1,2,3. Of these, 2 end in 1, 1 in 2 and 1 in 3, so row 3 is 2,1,1.
The table starts:
1
1,1
2,1,1
3,2,2,1
5,4,3,3,1
8,8,5,6,4,1
		

Crossrefs

Cf. A007059.

Programs

  • Mathematica
    uppertrim[list_] := Fold[DeleteCases[#1, #2, 1, 1] &, list, Range[Max[list]]]; to[list_, 0] := Append[list, Part[list, Length[uppertrim@list] + 1]]; to[list_, 1] := Append[list, Max@list + 1]; allfractal[n_] := Fold[to[#1, #2] &, {1}, #] & /@ Tuples[{0, 1}, n]; k = 10; Flatten[Table[BinCounts[allfractal[k][[All, i]], {1, i + 1}] 2^(i - 1), {i, k + 1}]/2^k] (* Birkas Gyorgy, Nov 25 2012 *)

Formula

If 2 <= n <= 2k-1, T(n,k) = C(n-2,k-2).
Previous Showing 21-23 of 23 results.