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.

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

This page as a plain text file.
%I A181851 #21 Jun 19 2024 17:03:24
%S A181851 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,
%T A181851 60,180,160,160,48,14,1,9,96,264,432,325,244,63,16,1,10,105,510,776,
%U A181851 892,585,350,80,18,1,11,220,567,1704,1835,1668,966,480,99,20,1
%N A181851 Triangle read by rows: T(n,k) = Sum_{c in composition(n,k)} lcm(c).
%C A181851 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.
%H A181851 Alois P. Heinz, <a href="/A181851/b181851.txt">Rows n = 1..150, flattened</a>
%e A181851 [1]   1
%e A181851 [2]   2    1
%e A181851 [3]   3    4    1
%e A181851 [4]   4    8    6    1
%e A181851 [5]   5   20   15    8    1
%e A181851 [6]   6   21   50   24   10    1
%e A181851 [7]   7   56   66   96   35   12   1
%p A181851 with(combstruct):
%p A181851 a181851_row := proc(n) local k,L,l,R,comp;
%p A181851 R := NULL;
%p A181851 for k from 1 to n do
%p A181851    L := 0;
%p A181851    comp := iterstructs(Composition(n),size=k):
%p A181851    while not finished(comp) do
%p A181851       l := nextstruct(comp);
%p A181851       L := L + ilcm(op(l));
%p A181851    od;
%p A181851    R := R,L;
%p A181851 od;
%p A181851 R end:
%t A181851 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 *)
%Y A181851 Cf. A181849, A181850, A181853.
%Y A181851 T(2n,n) gives A373865.
%K A181851 nonn,tabl
%O A181851 1,2
%A A181851 _Peter Luschny_, Dec 07 2010