The OEIS is supported by the many generous donors to the OEIS Foundation.

Number of 0..2 arrays of length n with each element differing from at least one neighbor by something other than 1

1

`%I #7 Jun 06 2013 14:25:49
`

`%S 0,5,9,25,57,141,345,853,2097,5149,12633,31013,76161,187053,459369,
`

`%T 1128053,2770065,6802301,16704249,41020357,100732833,247366989,
`

`%U 607452297,1491704341,3663139761,8995478557,22089965337,54245756261,133209897153
`

`%N Number of 0..2 arrays of length n with each element differing from at least one neighbor by something other than 1
`

`%C Column 2 of A221573
`

`%H R. H. Hardin, <a href="/A221567/b221567.txt">Table of n, a(n) for n = 1..210</a>
`

`%F Empirical: a(n) = 3*a(n-1) -2*a(n-2) +4*a(n-4).
`

`%F Empirical g.f.: -x^2*(5-6*x+8*x^2) / ( -1+3*x-2*x^2+4*x^4 ). - _R. J. Mathar_, Jun 06 2013
`

`%e Some solutions for n=6
`

`%e ..2....1....2....0....0....1....2....0....0....0....0....2....0....2....0....1
`

`%e ..0....1....2....0....0....1....0....2....2....0....0....0....0....2....0....1
`

`%e ..0....1....1....2....2....0....0....2....2....2....2....1....2....1....0....2
`

`%e ..0....0....1....2....0....0....0....0....0....0....2....1....2....1....2....2
`

`%e ..2....0....2....2....2....1....1....2....0....0....1....2....2....2....0....0
`

`%e ..0....0....2....2....2....1....1....2....2....2....1....0....0....0....0....2
`

`%K nonn
`

`%O 1,2
`

`%A _R. H. Hardin_ Jan 20 2013
`