OFFSET
1,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..300
EXAMPLE
a(4) = 3: [1,1,1,1], [1,1,2], [1,3];
a(5) = 2: [1,1,1,1,1], [1,2,2];
a(6) = 5: [1,1,1,1,1,1], [1,1,1,1,2], [1,1,1,3], [1,1,4], [1,5];
a(7) = 6: [1,1,1,1,1,1,1], [1,1,1,2,2], [1,1,1,1,3], [1,1,2,3], [1,2,4], [1,1,5];
a(8) = 12: [1,1,1,1,1,1,1,1], [1,1,1,1,1,1,2], [1,1,2,2,2], [1,1,1,2,3], [1,2,2,3], [1,1,3,3], [1,1,1,1,4], [1,3,4], [1,1,1,5], [1,2,5], [3,5], [1,7].
MAPLE
b:= proc(n, j, t, s) option remember;
add(b(n-i, i, t+1, s), i=j..iquo(n, 2))+
`if`(igcd(t, s)=1 and igcd(t, n)=1 and igcd(n, s)=1, 1, 0)
end:
a:= n-> `if`(n=1, 1, add(b(n-i, i, 2, i), i=1..iquo(n, 2))):
seq(a(n), n=1..60);
MATHEMATICA
b[n_, j_, t_, s_] := b[n, j, t, s] = Sum[b[n-i, i, t+1, s], {i, j, Quotient[n, 2]}] + If[GCD[t, s] == 1 && GCD[t, n] == 1 && GCD[n, s] == 1, 1, 0]; a[n_] := If[n == 1, 1, Sum [b[n-i, i, 2, i], {i, 1, Quotient[n, 2]}]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Oct 07 2014, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 28 2011
STATUS
approved