A269658 Number of length-5 0..n arrays with no adjacent pair x,x+1 repeated.
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
Keywords
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
Links
- R. H. Hardin, Table of n, a(n) for n = 0..210 (a(0) = 1 inserted by _M. F. Hasler_, Feb 29 2020).
Crossrefs
Row 5 of A269656.
Programs
-
PARI
apply( {A269658(n)=(n+1)^5-3*n*(n+1)}, [0..44]) \\ 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
Extensions
Extended to a(0) = 1 by M. F. Hasler, Feb 29 2020
Comments