login
Number of length-n 0..3 arrays with no repeated value equal to the previous repeated value.
1

%I #9 Jan 22 2019 08:19:32

%S 4,16,60,228,852,3180,11796,43644,160980,592572,2177268,7988700,

%T 29277204,107195196,392179380,1433907228,5240022612,19140884220,

%U 69894090996,255150047964,931214323860,3397977981372,12397189043508,45224087388060

%N Number of length-n 0..3 arrays with no repeated value equal to the previous repeated value.

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

%F Empirical: a(n) = 5*a(n-1) - 18*a(n-3).

%F Conjectures from _Colin Barker_, Jan 22 2019: (Start)

%F G.f.: 4*x*(1 - x - 5*x^2) / ((1 - 3*x)*(1 - 2*x - 6*x^2)).

%F a(n) = (-28*3^n + (49-17*sqrt(7))*(1-sqrt(7))^n + (1+sqrt(7))^n*(49+17*sqrt(7))) / 63.

%F (End)

%e Some solutions for n=9:

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

%e ..0. .1. .1. .1. .3. .2. .3. .0. .2. .1. .1. .1. .3. .2. .2. .1

%e ..1. .2. .2. .3. .1. .0. .2. .0. .1. .0. .3. .2. .3. .0. .2. .0

%e ..0. .1. .3. .0. .3. .0. .1. .2. .0. .0. .0. .1. .0. .3. .1. .1

%e ..1. .2. .0. .1. .1. .1. .0. .2. .3. .1. .2. .1. .3. .3. .1. .0

%e ..2. .3. .3. .2. .3. .2. .1. .0. .1. .3. .1. .3. .2. .1. .0. .0

%e ..0. .0. .0. .2. .1. .3. .2. .0. .3. .2. .1. .1. .3. .3. .3. .1

%e ..2. .0. .1. .0. .3. .0. .0. .2. .3. .0. .2. .0. .1. .2. .0. .1

%e ..2. .3. .0. .0. .2. .2. .3. .2. .2. .2. .2. .0. .0. .2. .0. .0

%Y Column 3 of A269467.

%K nonn

%O 1,1

%A _R. H. Hardin_, Feb 27 2016