|
|
A269613
|
|
Number of length-n 0..2 arrays with no repeated value differing from the previous repeated value by other than plus two, zero or minus 1.
|
|
2
|
|
|
3, 9, 27, 78, 222, 624, 1740, 4824, 13320, 36672, 100752, 276384, 757344, 2073600, 5674176, 15520128, 42437760, 116014080, 317100288, 866621952, 2368230912, 6471278592, 17682164736, 48313178112, 132003268608, 360658059264
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
Empirical: a(n) = 4*a(n-1) - 2*a(n-2) - 4*a(n-3).
G.f.: 3*x*(1 - x - x^2) / ((1 - 2*x)*(1 - 2*x - 2*x^2)).
a(n) = (-3*2^n + (3-2*sqrt(3))*(1-sqrt(3))^n + (1+sqrt(3))^n*(3+2*sqrt(3))) / 4.
(End)
|
|
EXAMPLE
|
Some solutions for n=8:
..1. .1. .0. .0. .0. .1. .1. .1. .2. .2. .2. .1. .1. .1. .0. .1
..2. .1. .0. .0. .2. .2. .1. .2. .1. .0. .0. .0. .1. .2. .2. .0
..2. .0. .0. .1. .2. .1. .0. .1. .2. .0. .2. .2. .2. .1. .0. .1
..2. .1. .1. .2. .2. .1. .1. .1. .0. .2. .1. .1. .1. .2. .0. .0
..2. .2. .2. .0. .1. .0. .1. .0. .1. .0. .1. .1. .0. .0. .1. .0
..2. .0. .2. .2. .2. .0. .1. .1. .1. .0. .2. .2. .1. .2. .2. .1
..1. .0. .1. .0. .1. .2. .0. .1. .1. .1. .0. .0. .1. .1. .2. .2
..1. .0. .1. .2. .0. .1. .0. .1. .1. .2. .2. .1. .0. .2. .1. .1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|