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.
%I A181847 #20 Mar 24 2020 12:34:35 %S A181847 1,2,1,3,2,1,4,4,3,1,5,4,6,4,1,6,9,11,10,5,1,7,6,15,20,15,6,1,8,12,24, %T A181847 36,35,21,7,1,9,12,30,56,70,56,28,8,1,10,17,42,88,127,126,84,36,9,1 %N A181847 Triangle read by rows: T(n,k)= Sum_{c in C(n,k)}gcd(c) where C(n,k) is the set of all k-tuples of positive integers whose elements sum to n. %C A181847 C(n,k) counted by A007318(n-1,k-1) are also called compositions of n of size k (see A181842). %e A181847 [1] 1 %e A181847 [2] 2 1 %e A181847 [3] 3 2 1 %e A181847 [4] 4 4 3 1 %e A181847 [5] 5 4 6 4 1 %e A181847 [6] 6 9 11 10 5 1 %e A181847 [7] 7 6 15 20 15 6 1 %p A181847 with(combstruct): # By generating the objects, very inefficient. %p A181847 a181847_row := proc(n) local k,L,l,R,comp; R := NULL; %p A181847 for k from 1 to n do %p A181847 L := 0; %p A181847 comp := iterstructs(Composition(n),size=k): %p A181847 while not finished(comp) do %p A181847 l := nextstruct(comp); %p A181847 L := L + igcd(op(l)); %p A181847 od; %p A181847 R := R,L; %p A181847 od; %p A181847 R end: %p A181847 # second Maple program: %p A181847 with(numtheory): %p A181847 T := (n, k) -> add(phi(d)*binomial(n/d-1, k-1), d = divisors(n)): %p A181847 seq(seq(T(n, k), k=1..n), n=1..10); # _Peter Luschny_, Aug 27 2019 %o A181847 (Sage) # uses[DivisorTriangle from A327029] %o A181847 # DivisorTriangle Computes the (0,0)-based version. %o A181847 DivisorTriangle(euler_phi, lambda n,k: binomial(n-1, k-1), 10) # _Peter Luschny_, Aug 27 2019 %Y A181847 Cf. A034738, A065567, A065568, A327029. %K A181847 nonn,tabl %O A181847 1,2 %A A181847 _Peter Luschny_, Dec 07 2010