OFFSET
0,3
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 0..85
EXAMPLE
a(3) = 3: [1,2], [2,1], [3].
a(4) = 7: [1,1,2], [1,2,1], [1,3], [2,1,1], [2,2], [3,1], [4].
a(5) = 11: [1,1,3], [1,2,2], [1,3,1], [1,4], [2,1,2], [2,2,1], [2,3], [3,1,1], [3,2], [4,1], [5].
a(6) = 19: [1,1,2,2], [1,1,4], [1,2,1,2], [1,2,2,1], [1,3,2], [1,4,1], [1,5], [2,1,1,2], [2,1,2,1], [2,1,3], [2,2,1,1], [2,3,1], [2,4], [3,1,2], [3,3], [4,1,1], [4,2], [5,1], [6].
MAPLE
b:= proc(n, i, o) option remember; `if`(n=0, 1, add(
`if`(j in o, 0, b(n-j, i union {j}, select(y->0<y
and y<=n, o union map(x->2*j-x, i)))), j=1..n))
end:
a:= n-> b(n, {}, {}):
seq(a(n), n=0..30);
MATHEMATICA
b[n_, i_List, o_List] := b[n, i, o] = If[n == 0, 1, Sum[If[MemberQ[o, j], 0, b[n - j, i ~Union~ {j}, Select[o ~Union~ (2j-i), 0<# && # <= n &]]], {j, 1, n}]]; a[n_] := b[n, {}, {}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 06 2015, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Joerg Arndt and Alois P. Heinz, Feb 28 2014
STATUS
approved