login
A295045
Number of n X 2 0..1 arrays with each 1 horizontally or vertically adjacent to 0 or 2 1s.
4
3, 8, 19, 48, 120, 299, 747, 1865, 4656, 11625, 29024, 72464, 180921, 451705, 1127771, 2815704, 7029963, 17551696, 43821288, 109408531, 273160083, 681998289, 1702743904, 4251237649, 10614057408, 26500098080, 66162747313, 165188412465
OFFSET
1,1
COMMENTS
Column 2 of A295051.
From - Mikhail Lavrov, Oct 31 2022: (Start)
If the first row is 0 0, the array can continue with anything; there are a(n-1) such arrays for n > 1.
If the first row is 1 1, then the second row must be 1 1, and the third row must be 0 0; there are a(n-3) such arrays for n > 3.
If the first row is 1 0 or 0 1, then the rows after that can alternate between 0 1 and 1 0 for any number of steps before going to 0 0 (or reaching the end); there are 2(a(n-2) + a(n-3) + ...) such arrays for n > 2. This gives a(n) = a(n-1) + a(n-3) + 2(a(n-2) + a(n-3) + ...); to simplify the recurrence, apply it to a(n) - a(n-1), getting a(n) - a(n-1) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + 2a(n-2). This proves Colin Barker's recurrence relation below for n > 4. (End)
FORMULA
Empirical: a(n) = 2*a(n-1) + a(n-2) + a(n-3) - a(n-4).
Empirical g.f.: x*(3 + 2*x - x^3) / (1 - 2*x - x^2 - x^3 + x^4). - Colin Barker, Feb 21 2018
EXAMPLE
Some solutions for n=7:
0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 1 0 0 0
1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1
1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 0 0
0 1 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0
1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0
0 1 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 0
MATHEMATICA
LinearRecurrence[{2, 1, 1, -1}, {3, 8, 19, 48}, 30] (* Mikhail Lavrov, Nov 01 2022 *)
CROSSREFS
Cf. A295051.
Sequence in context: A244208 A296329 A339525 * A181849 A164586 A018032
KEYWORD
nonn
AUTHOR
R. H. Hardin, Nov 13 2017
STATUS
approved