OFFSET
1,1
LINKS
R. H. Hardin, Table of n, a(n) for n = 1..210
Index entries for linear recurrences with constant coefficients, signature (3,-1,-2).
FORMULA
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3).
From Colin Barker, Dec 24 2018: (Start)
G.f.: x*(13 - 16*x - 16*x^2) / ((1 - 2*x)*(1 - x - x^2)).
a(n) = 2^(1+n) + (3*2^(-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5)))) / sqrt(5).
(End)
a(n) = 2^(n+1)+3*A000045(n+3). - R. J. Mathar, Oct 09 2020
EXAMPLE
Some solutions for n=4:
..0..1..0....1..0..1....1..0..1....0..1..0....0..1..0....1..1..1....1..0..1
..1..0..1....0..1..0....1..0..1....1..0..1....1..0..1....0..0..0....1..0..1
..0..1..0....1..0..1....0..1..0....1..0..1....0..1..0....0..0..0....0..1..0
..1..0..1....0..1..0....0..1..0....1..0..1....0..1..0....0..0..0....0..1..0
..0..1..0....1..0..1....0..1..0....0..1..0....1..0..1....1..1..1....1..0..1
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. H. Hardin, Jun 21 2015
STATUS
approved