OFFSET
1,2
COMMENTS
EXAMPLE
[1] 1
[2] 2 1
[3] 3 2 1
[4] 4 4 3 1
[5] 5 4 6 4 1
[6] 6 9 11 10 5 1
[7] 7 6 15 20 15 6 1
MAPLE
with(combstruct): # By generating the objects, very inefficient.
a181847_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 + igcd(op(l));
od;
R := R, L;
od;
R end:
# second Maple program:
with(numtheory):
T := (n, k) -> add(phi(d)*binomial(n/d-1, k-1), d = divisors(n)):
seq(seq(T(n, k), k=1..n), n=1..10); # Peter Luschny, Aug 27 2019
PROG
(Sage) # uses[DivisorTriangle from A327029]
# DivisorTriangle Computes the (0, 0)-based version.
DivisorTriangle(euler_phi, lambda n, k: binomial(n-1, k-1), 10) # Peter Luschny, Aug 27 2019
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Dec 07 2010
STATUS
approved