OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (terms n=1..210 from R. H. Hardin)
FORMULA
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) -a(n-5).
From Colin Barker, Mar 21 2018: (Start)
G.f.: (x^3-x+1)/((x+1)*(x-1)^4).
a(n) = (2*n^3 + 3*n^2 + 22*n + 24) / 24 for n even.
a(n) = (2*n^3 + 3*n^2 + 22*n + 21) / 24 for n odd.
(End)
EXAMPLE
Some solutions for n=4:
..0..0....0..0....0..1....0..0....0..1....0..0....1..1....0..1....0..0....0..1
..0..0....0..0....0..1....1..1....1..0....0..0....1..1....1..0....0..0....1..0
..0..1....0..0....1..0....1..1....1..1....1..1....1..1....1..0....0..0....1..0
..1..0....1..1....1..0....1..1....1..1....1..1....1..1....1..1....0..0....1..0
MAPLE
a:= proc(n) option remember;
`if`(n<0, 0, 1+a(n-1)+floor(n^2/4))
end:
seq(a(n), n=0..100); # Alois P. Heinz, Dec 27 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. H. Hardin, Dec 29 2015
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Dec 27 2023
STATUS
approved