login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of length-4 0..n arrays with no repeated value differing from the previous repeated value by other than plus two or minus 1.
1

%I #7 Jan 25 2019 09:28:47

%S 9,63,221,567,1209,2279,3933,6351,9737,14319,20349,28103,37881,50007,

%T 64829,82719,104073,129311,158877,193239,232889,278343,330141,388847,

%U 455049,529359,612413,704871,807417,920759,1045629,1182783,1333001

%N Number of length-4 0..n arrays with no repeated value differing from the previous repeated value by other than plus two or minus 1.

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

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

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

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

%F a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>5.

%F (End)

%e Some solutions for n=3:

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

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

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

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

%Y Row 4 of A269640.

%K nonn

%O 1,1

%A _R. H. Hardin_, Mar 02 2016