OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..8354
EXAMPLE
a(7) = 5:
.. O O O ....... O O ....... O ... O ......... O ........................
. O O O O ... O O O O O ... O O O O O ... O O O O O O ... O O O O O O O .
MAPLE
b:= proc(n, i, p) option remember; `if`(n<0, 0, `if`(n=0,
`if`(p<0 and i=1, 1, 0), `if`(n=i or n=i+p, 1, 0)+
`if`(i<1 and p=1, 0, b(n-2*i, i, -p))+b(n-2*(i+p), i+p, -p)))
end:
a:= n-> `if`(n=0, 1, b(n, 0, 1)):
seq(a(n), n=0..60); # Alois P. Heinz, Sep 02 2017
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[n < 0, 0, If[n == 0, If[p < 0 && i == 1, 1, 0], If[n == i || n == i + p, 1, 0] + If[i < 1 && p == 1, 0, b[n - 2i, i, -p]] + b[n - 2(i + p), i + p, -p]]];
a[n_] := If[n == 0, 1, b[n, 0, 1]];
a /@ Range[0, 60] (* Jean-François Alcover, Nov 14 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Sep 01 2017
EXTENSIONS
a(33)-a(48) from Alois P. Heinz, Sep 02 2017
STATUS
approved