|
|
A269461
|
|
Number of length-n 0..2 arrays with no repeated value equal to the previous repeated value.
|
|
2
|
|
|
3, 9, 24, 66, 174, 462, 1206, 3150, 8166, 21150, 54582, 140718, 362118, 931134, 2391894, 6141006, 15757734, 40420062, 103647606, 265721070, 681097926, 1745555070, 4473092502, 11461604238, 29366557158, 75238139934, 192754700214
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
Empirical: a(n) = 3*a(n-1) + 2*a(n-2) - 8*a(n-3).
G.f.: 3*x*(1 - 3*x^2) / ((1 - 2*x)*(1 - x - 4*x^2)).
a(n) = 2^(-4-n)*(-51*4^(1+n) + (255-57*sqrt(17))*(1-sqrt(17))^n + 3*(1+sqrt(17))^n*(85+19*sqrt(17))) / 17.
(End)
|
|
EXAMPLE
|
Some solutions for n=9:
..1. .1. .0. .2. .1. .0. .1. .2. .2. .1. .1. .0. .2. .2. .0. .2
..1. .2. .1. .2. .2. .1. .0. .1. .1. .0. .1. .2. .0. .1. .1. .1
..0. .2. .2. .1. .1. .2. .1. .1. .0. .0. .0. .1. .1. .1. .0. .1
..2. .0. .2. .2. .2. .2. .2. .0. .0. .1. .2. .2. .1. .0. .1. .2
..2. .1. .0. .0. .0. .1. .2. .2. .2. .2. .0. .0. .2. .0. .0. .0
..1. .0. .2. .1. .1. .0. .0. .2. .1. .2. .0. .1. .1. .2. .2. .0
..2. .1. .1. .1. .0. .2. .2. .1. .1. .0. .1. .0. .0. .2. .1. .2
..0. .1. .2. .0. .0. .1. .1. .0. .0. .2. .2. .1. .2. .1. .1. .2
..1. .0. .1. .0. .1. .0. .0. .1. .1. .1. .2. .0. .0. .1. .2. .0
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|