OFFSET
1,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..250
FORMULA
EXAMPLE
a(5) = 8: [1,2,2], [1,4], [2,1,2], [2,2,1], [2,3], [3,2], [4,1], [5].
MAPLE
b:= proc(n, t, g) option remember; `if`(n=0, `if`(irem(t, g)=0, 0, 1), add(b(n-i, t+1, max(i, g)), i=1..n)) end: a:= n-> b(n, 0, 0): seq(a(n), n=1..40);
MATHEMATICA
b[n_, t_, g_] := b[n, t, g] = If[n == 0, If[Mod[t, g] == 0, 0, 1], Sum [b[n-i, t+1, Max[i, g]], {i, 1, n}]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Nov 05 2014, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 11 2011
STATUS
approved