OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..500
EXAMPLE
a(5) = 4: [1,1,1,1,1], [1,2,2], [2,3], [5].
a(6) = 8: [1,1,1,1,1,1], [1,1,1,1,2], [2,2,2], [1,1,1,3], [3,3], [1,1,4], [1,5], [6].
MAPLE
b:= proc(n, j, t) option remember;
add(b(n-i, i, t+1), i=j..iquo(n, 2))+`if`(igcd(t, n)=1, 1, 0)
end:
a:= n-> b(n, 1, 1):
seq(a(n), n=1..60);
MATHEMATICA
b[n_, j_, t_] := b[n, j, t] = Sum[b[n-i, i, t+1], {i, j, Quotient[n, 2]}] + If[GCD[t, n] == 1, 1, 0];
a[n_] := b[n, 1, 1];
Array[a, 60] (* Jean-François Alcover, Dec 05 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 21 2011
STATUS
approved