OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..5000
EXAMPLE
a(7) = 2: [7], [3,1,3].
a(8) = 6: [8], [5,3], [3,5], [3,1,3,1], [2,4,2], [1,3,1,3].
a(9) = 4: [9], [5,3,1], [1,3,5], [1,3,1,3,1].
MAPLE
b:= proc(n, i) option remember;
`if`(n<1 or i<1, 0, `if`(n=i, 1, add(b(n-i, i+j), j=[-2, 2])))
end:
a:= n-> `if`(n=0, 1, add(b(n, j), j=1..n)):
seq(a(n), n=0..80);
MATHEMATICA
b[n_, i_] := b[n, i] = If[n < 1 || i < 1, 0, If[n == i, 1, Sum[b[n-i, i+j], { j, {-2, 2}}]]]; a[n_] := If[n == 0, 1, Sum[b[n, j], {j, 1, n}]]; Table [a[n], {n, 0, 80}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 08 2012
STATUS
approved