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.

Showing 1-4 of 4 results.

A181842 Triangle read by rows: T(n,k) = Sum_{c in partition(n,n-k+1)} lcm(c).

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 5, 4, 1, 2, 5, 10, 5, 1, 2, 5, 12, 12, 6, 1, 2, 5, 12, 18, 28, 7, 1, 2, 5, 12, 20, 38, 32, 8, 1, 2, 5, 12, 20, 44, 57, 48, 9, 1, 2, 5, 12, 20, 46, 67, 100, 55, 10
Offset: 1

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Comments

In A181842 through A181854 the following terminology is used.
Let n, k be positive integers.
* Partition: A (n,k)-partition is the set of all k-sets of
positive integers whose elements sum to n.
- The cardinality of a (n,k)-partition: A008284(n,k).
- Maple: (n,k) -> combstruct[count](Partition(n),size=k).
- The (6,2)-partition is {{1,5},{2,4},{3,3}}.
* Composition: A (n,k)-composition is the set of all k-tuples of positive integers whose elements sum to n.
- The cardinality of a (n,k)-composition: A007318(n-1,k-1).
- Maple: (n,k) -> combstruct[count](Composition(n),size=k).
- The (6,2)-composition is {<5,1>,<4,2>,<3,3>,<2,4>,<1,5>}.
* Combination: A (n,k)-combination is the set of all k-subsets
of {1,2,..,n}.
- The cardinality of a (n,k)-combination: A007318(n,k).
- Maple: (n,k) -> combstruct[count](Combination(n),size=k).
- The (4,2)-combination is {{1,2},{1,3},{1,4},{2,3},{2,4},{3,4}}.

Examples

			[1]   1
[2]   1   2
[3]   1   2   3
[4]   1   2   5   4
[5]   1   2   5   10   5
[6]   1   2   5   12   12   6
[7]   1   2   5   12   18   28   7
		

Crossrefs

Programs

  • Maple
    with(combstruct):
    a181842_row := proc(n) local k,L,l,R,part;
    R := NULL;
    for k from 1 to n do
       L := 0;
       part := iterstructs(Partition(n),size=n-k+1):
       while not finished(part) do
          l := nextstruct(part);
          L := L + ilcm(op(l));
       od;
       R := R,L;
    od;
    R end:
  • Mathematica
    t[n_, k_] := LCM @@@ IntegerPartitions[n, {n - k + 1}] // Total; Table[t[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 26 2013 *)

A181853 Triangle read by rows: T(n,k) = Sum_{c in C(n,k)} lcm(c) where C(n,k) is the set of all k-subsets of {1,2,...,n}.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 6, 11, 6, 1, 10, 31, 34, 12, 1, 15, 81, 189, 182, 60, 1, 21, 141, 393, 494, 282, 60, 1, 28, 288, 1380, 3245, 3740, 2034, 420, 1, 36, 456, 2716, 8293, 13268, 11338, 4908, 840, 1, 45, 726, 5578, 22207, 47351, 57598, 40602, 15564, 2520
Offset: 0

Views

Author

Peter Luschny, Dec 06 2010

Keywords

Comments

The C(n,k) are also called combinations of n with size k (see A181842).
Main diagonal gives: A003418. Lower diagonal gives: A094308. Column k=1 gives: A000217. - Alois P. Heinz, Jul 29 2013

Examples

			[0]   1
[1]   1    1
[2]   1    3     2
[3]   1    6    11     6
[4]   1   10    31    34    12
[5]   1   15    81   189   182    60
[6]   1   21   141   393   494   282   60
		

Crossrefs

Row sums give A226037.

Programs

  • Maple
    with(combstruct):
    a181853_row := proc(n) local k,L,l,R,comb;
    R := NULL;
    for k from 0 to n do
       L := 0;
       comb := iterstructs(Combination(n),size=k):
       while not finished(comb) do
          l := nextstruct(comb);
          L := L + ilcm(op(l));
       od;
       R := R,L;
    od;
    R end:
    # second Maple program:
    b:= proc(n, k) option remember; `if`(k=0, [1],
         [`if`(k add(c, c=b(n, k)):
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Jul 29 2013
    # third Maple program:
    b:= proc(n, m) option remember; expand(`if`(n=0, m,
          b(n-1, ilcm(m, n))*x+b(n-1, m)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Sep 05 2023
  • Mathematica
    t[, 0] = 1; t[n, k_] := Sum[LCM @@ c, {c, Subsets[Range[n], {k}]}]; Table[t[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 29 2013 *)
  • Sage
    # (After Alois P. Heinz)
    @CachedFunction
    def b(n, k):
        if k == 0: return [1]
        w = b(n-1, k) if kPeter Luschny, Jul 29 2013

A181850 Triangle read by rows: Partial row sums of A181851(n,k).

Original entry on oeis.org

1, 2, 3, 3, 7, 8, 4, 12, 18, 19, 5, 25, 40, 48, 49, 6, 27, 77, 101, 111, 112, 7, 63, 129, 225, 260, 272, 273, 8, 68, 248, 408, 568, 616, 630, 631, 9, 105, 369, 801, 1126, 1370, 1433, 1449, 1450, 10, 115, 625, 1401, 2293, 2878, 3228, 3308, 3326, 3327
Offset: 1

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Examples

			[1]   1
[2]   2    3
[3]   3    7     8
[4]   4   12    18    19
[5]   5   25    40    48    49
[6]   6   27    77   101   111   112
[7]   7   63   129   225   260   272   273
		

Crossrefs

Programs

  • Maple
    with(combstruct):
    a181850_row := proc(n) local k,L,l,R,comp;
    R := NULL; L := 0;
    for k from 1 to n do
       comp := iterstructs(Composition(n),size=k):
       while not finished(comp) do
          l := nextstruct(comp);
          L := L + ilcm(op(l));
       od;
       R := R,L;
    od;
    R end:
  • Mathematica
    c[n_, k_] := Permutations /@ IntegerPartitions[n, {k}] // Flatten[#, 1]&; t[n_, k_] := Total[LCM @@@ c[n, k]]; Table[Print[row = Table[t[n, k], {k, 1, n}] // Accumulate]; row, {n, 1, 25}] // Flatten  (* Jean-François Alcover, Feb 05 2014 *)

A249042 Three-dimensional array of numbers N(r,p,m) read by triangular slices, each slice being read across rows: N(r,p,m) is the number of "r-panes in a (p,m) structure".

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 4, 1, 6, 6, 1, 6, 7, 7, 24, 18, 1, 14, 36, 24, 1, 10, 11, 25, 70, 46, 15, 100, 180, 96, 1, 30, 150, 240, 120, 1, 15, 16, 65, 165, 101, 90, 455, 690, 326, 31, 360, 1170, 1440, 600, 1, 62, 540, 1560, 1800, 720
Offset: 1

Views

Author

N. J. A. Sloane, Oct 29 2014

Keywords

Comments

Three-dimensional arrays don't really work in the OEIS, but this one seems like it should be included. See Good-Tideman for precise definition.

Examples

			The initial triangular slices are:
1
-
1
1 2
---
1
3 4
1 6 6
-----
1
6 7
7 24 18
1 14 36 24
----------
1
10 11
25 70  46
15 100 180 96
1  30  150 240 120
----------------
1
15 16
65 165 101
90 455 690  326
31 360 1170 1440 600
1  62  540  1560 1800 720
		

Crossrefs

The sequence of left edges of the triangles is A008278; the bases of the triangles give A019538; the hypotenuses give A181854.

Programs

  • Mathematica
    S1[m_, n_] := Abs[StirlingS1[m, m - n]];
    S2[m_, n_] := StirlingS2[m, m - n];
    Nr[r_, p_, m_] := S2[m, p - r] Sum[S1[m - p + r, nu], {nu, 0, r}];
    Table[Nr[r, p, m], {m, 1, 6}, {p, 0, m - 1}, {r, 0, p}] // Flatten (* Jean-François Alcover, Nov 01 2018 *)

Formula

There is a formula involving Stirling numbers.

Extensions

More terms from Michel Marcus, Aug 28 2015
Showing 1-4 of 4 results.