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.

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 *)