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-2 of 2 results.

A181851 Triangle read by rows: T(n,k) = Sum_{c in composition(n,k)} lcm(c).

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 4, 8, 6, 1, 5, 20, 15, 8, 1, 6, 21, 50, 24, 10, 1, 7, 56, 66, 96, 35, 12, 1, 8, 60, 180, 160, 160, 48, 14, 1, 9, 96, 264, 432, 325, 244, 63, 16, 1, 10, 105, 510, 776, 892, 585, 350, 80, 18, 1, 11, 220, 567, 1704, 1835, 1668, 966, 480, 99, 20, 1
Offset: 1

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Comments

Composition(n,k) is the set of the k-tuples of positive integers which sum to n (see A181842). Taking the example in A181842, T(6,2) = lcm(5,1) + lcm(4,2) + lcm(3,3) + lcm(2,4) + lcm(1,5) = 5+4+3+4+5 = 21.

Examples

			[1]   1
[2]   2    1
[3]   3    4    1
[4]   4    8    6    1
[5]   5   20   15    8    1
[6]   6   21   50   24   10    1
[7]   7   56   66   96   35   12   1
		

Crossrefs

T(2n,n) gives A373865.

Programs

  • Maple
    with(combstruct):
    a181851_row := proc(n) local k,L,l,R,comp;
    R := NULL;
    for k from 1 to n do
       L := 0;
       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[t[n, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Feb 05 2014 *)

A181849 Row sums of A181851.

Original entry on oeis.org

1, 1, 3, 8, 19, 49, 112, 273, 631, 1450, 3327, 7571, 17170, 38519, 85951, 190392, 419759, 921189, 2013874, 4385889, 9516273, 20577618, 44352499, 95324853, 204307052, 436768151, 931448065, 1981879262, 4207887155, 8916102661, 18856430826, 39807226901, 83892649091
Offset: 0

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Crossrefs

Programs

  • Maple
    with(combstruct):
    a181849 := proc(n) local k,L,l,comp;
    L := 1-signum(n);
    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;
    od;
    L end:
    seq(a181849(n), n=0..15);
  • Mathematica
    c[n_, k_] := Permutations /@ IntegerPartitions[n, {k}] // Flatten[#, 1]&; t[n_, k_] := Total[LCM @@@ c[n, k]]; Table[Print[s = Sum[t[n, k], {k, 1, n}]]; s, {n, 1, 25}]  (* Jean-François Alcover, Feb 05 2014 *)

Extensions

a(23)-a(25) from Alois P. Heinz, Jul 29 2013
a(0), a(26)-a(32) from Alois P. Heinz, Jun 18 2024
Showing 1-2 of 2 results.