OFFSET
0,2
COMMENTS
The repeated pair is of the form (x,x+1) with 0 <= x <= n-1. Together with its repetition it occupies all but one position of the length-5 array. There are three choices for this position (beginning, middle, end; cf. example for n=1) and n+1 choices for the element in this position. This makes n*3*(n+1) forbidden arrays out of the (n+1)^5 possible ones. - M. F. Hasler, Feb 29 2020
LINKS
R. H. Hardin, Table of n, a(n) for n = 0..210 (a(0) = 1 inserted by M. F. Hasler, Feb 29 2020).
FORMULA
Empirical: a(n) = n^5 + 5*n^4 + 10*n^3 + 7*n^2 + 2*n + 1.
Conjectures from Colin Barker, Jan 25 2019: (Start)
G.f.: (1 + 20*x + 84*x^2 + 8*x^3 + 7*x^4) / (1 - x)^6.
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n >= 6.
(End)
a(n) = (n+1)^5 - 3*n*(n+1) = A000584(n+1) - A028896(n), cf. comment, which confirms the above conjectured formulas. - M. F. Hasler, Feb 29 2020
EXAMPLE
From M. F. Hasler, Feb 29 2020: (Start)
For n=0, there is only one array of length 5 with coefficients in 0..0, (0,0,0,0,0), and it satisfies the requirement, so a(0) = 1.
For n=1, the six arrays of length 5 with coefficients in 0..1 which do not satisfy the requirement are {(0,1,0,1,x), (0,1,x,0,1), (x,0,1,0,1); 0 <= x <= 1}, so a(1) = 2^5 - 6 = 26.
(End)
Some solutions for n=3:
2 3 1 0 0 3 3 0 0 0 0 3 2 3 2 2
2 0 3 3 2 3 3 1 2 3 0 3 3 1 0 3
1 0 2 1 1 1 3 2 3 2 3 2 0 1 2 0
0 2 0 1 0 2 2 2 1 3 3 2 2 1 3 3
2 3 0 0 0 1 1 3 1 0 1 0 1 1 1 1
PROG
(PARI) apply( {A269658(n)=(n+1)^5-3*n*(n+1)}, [0..44]) \\ M. F. Hasler, Feb 29 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
R. H. Hardin, Mar 02 2016
EXTENSIONS
Extended to a(0) = 1 by M. F. Hasler, Feb 29 2020
STATUS
approved