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 A126501 #47 Oct 21 2022 21:58:39 %S A126501 1,6,34,194,1106,6306,35954,204994,1168786,6663906,37994674,216628994, %T A126501 1235123666,7042134306,40151166194,228924368194,1305226505746, %U A126501 7441830001506,42430056030514,241917600158594,1379308224915026 %N A126501 Number of n-tuples of numbers [0..5] (leading zeros allowed) in which adjacent digits differ by 4 or less. %C A126501 For n>=1, a(n) equals the numbers of words of length n-1 on alphabet {0,1,...,5} containing no subwords 00 and 11. - _Milan Janjic_, Jan 31 2015 %C A126501 See PARI script for proof of g.f. - _Andrew Howroyd_, Apr 15 2017 %H A126501 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (5, 4). %F A126501 [Empirical] a(base,n) = a(base-1,n)+9^(n-1) for base>=4n-3; a(base,n) = a(base-1,n)+9^(n-1)-2 when base=4n-4. %F A126501 From _Philippe Deléham_, Mar 24 2012: (Start) %F A126501 G.f.: (1+x)/(1-5*x-4*x^2). %F A126501 a(n) = 5*a(n-1) + 4*a(n-2), a(0) = 1, a(1) = 6. %F A126501 a(n) = Sum_{k, 0<=k<=n} A054458(n,k)*3^k. (End) %F A126501 Conjecture: a(n) = (2^(-1-n)*((5-sqrt(41))^n*(-7+sqrt(41)) + (5+sqrt(41))^n*(7+sqrt(41)))) / sqrt(41). - _Colin Barker_, Jan 20 2017 %t A126501 LinearRecurrence[{5, 4}, {1, 6}, 21] (* _Jean-François Alcover_, Oct 07 2017 *) %o A126501 (S/R) stvar $[N]:(0..M-1) init $[]:=0 asgn $[]->{*} kill +[i in 0..N-2](($[i]`-$[i+1]`>4)+($[i+1]`-$[i]`>4)) %o A126501 (PARI) \\ Proof of generating function %o A126501 TransferGf(m,u,t,v,z)=vector(m,i,u(i))*matsolve(matid(m)-z*matrix(m,m,i,j,t(i,j)),vectorv(m,i,v(i))); %o A126501 RowGf(d,m,z)=1+z*TransferGf(m, i->1, (i,j)->abs(i-j)<=d, j->1, z); %o A126501 print(RowGf(4,6,x)); \\ _Andrew Howroyd_, Apr 15 2017 %Y A126501 Cf. Base 6 differing by three or less A126474, two or less A126393, one or less A126360. %K A126501 nonn,easy %O A126501 0,2 %A A126501 _R. H. Hardin_, Dec 28 2006