login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
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, 36, 35, 21, 7, 1, 9, 12, 30, 56, 70, 56, 28, 8, 1, 10, 17, 42, 88, 127, 126, 84, 36, 9, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
C(n,k) counted by A007318(n-1,k-1) are also called compositions of n of size k (see A181842).
LINKS
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
Sequence in context: A105438 A062001 A361043 * A366986 A209562 A259344
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Dec 07 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 03:51 EDT 2024. Contains 371264 sequences. (Running on oeis4.)