cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A269658 Number of length-5 0..n arrays with no adjacent pair x,x+1 repeated.

Original entry on oeis.org

1, 26, 225, 988, 3065, 7686, 16681, 32600, 58833, 99730, 160721, 248436, 370825, 537278, 758745, 1047856, 1419041, 1888650, 2475073, 3198860, 4082841, 5152246, 6434825, 7960968, 9763825, 11879426, 14346801, 17208100, 20508713, 24297390
Offset: 0

Views

Author

R. H. Hardin, Mar 02 2016

Keywords

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

Examples

			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
		

Crossrefs

Row 5 of A269656.

Programs

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

Extensions

Extended to a(0) = 1 by M. F. Hasler, Feb 29 2020