|
|
A199890
|
|
Number of compositions of n such that the number of parts and the largest part and the smallest part are pairwise coprime.
|
|
2
|
|
|
1, 1, 1, 6, 4, 15, 37, 81, 133, 270, 565, 1200, 2449, 4961, 10014, 20083, 39585, 77566, 152934, 305587, 617857, 1257333, 2558837, 5180712, 10404918, 20732162, 41087390, 81291644, 161136101, 320733232, 641408052, 1287453960, 2589099670, 5207066575, 10459270462
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 6: [1,1,1,1], [1,1,2], [1,2,1], [1,3], [2,1,1], [3,1].
|
|
MAPLE
|
b:= proc(n, t, g, k) option remember;
`if`(n=0, `if`(igcd(g, t)=1 and igcd(k, t)=1 and igcd(g, k)=1, 1, 0),
add(b(n-i, t+1, max(i, g), min(i, k)), i=1..n))
end:
a:= n-> b(n, 0, 0, infinity):
seq(a(n), n=1..40);
|
|
MATHEMATICA
|
b[n_, t_, g_, k_] := b[n, t, g, k] = If[n == 0, If[GCD[g, t] == 1 && GCD[k, t] == 1 && GCD[g, k] == 1, 1, 0], Sum[b[n-i, t+1, Max[i, g], Min[i, k]], {i, 1, n}]]; a[n_] := b[n, 0, 0, Infinity]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Nov 05 2014, after Alois P. Heinz *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|