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.
%I A268458 #16 Nov 29 2019 09:12:38 %S A268458 11,67,229,581,1231,2311,3977,6409,9811,14411,20461,28237,38039,50191, %T A268458 65041,82961,104347,129619,159221,193621,233311,278807,330649,389401, %U A268458 455651,530011,613117,705629,808231,921631,1046561,1183777,1334059 %N A268458 Number of length-4 0..n arrays with no adjacent pair x,x+1 followed at any distance by x+1,x. %H A268458 R. H. Hardin, <a href="/A268458/b268458.txt">Table of n, a(n) for n = 1..210</a> %F A268458 Empirical: a(n) = n^4 + 4*n^3 + 4*n^2 + n + 1. %F A268458 Empirical g.f.: x*(11 + 12*x + 4*x^2 - 4*x^3 + x^4) / (1 - x)^5. - _Colin Barker_, Jan 13 2019 %F A268458 Proof of empirical formula: There are (n+1)^4 arrays without the constraint. n of them are of the form (x,x+1,x+1,x) with 0 <= x <= n-1, n*(n+1) are of the form (x,x+1,x,y) with 0 <= x<= n-1 and 0<=y<=n, and n*(n+1) are of the form (y,x,x+1,x). That leaves n^4 + 4*n^3 + 4*n^2 + n + 1. - _Robert Israel_, Nov 28 2019 %e A268458 Some solutions for n=9: %e A268458 2 7 0 3 8 5 3 3 4 5 8 9 9 8 2 4 %e A268458 7 1 3 8 4 1 1 0 8 6 2 5 1 9 2 5 %e A268458 6 0 7 3 1 1 0 5 8 2 0 8 1 4 0 2 %e A268458 2 3 1 4 5 0 9 4 9 2 9 4 8 6 2 9 %p A268458 seq(n^4 + 4*n^3 + 4*n^2 + n + 1, n=1..100); # _Robert Israel_, Nov 28 2019 %Y A268458 Row 4 of A268457. %K A268458 nonn %O A268458 1,1 %A A268458 _R. H. Hardin_, Feb 04 2016