login
A126534
Number of base 13 n-digit numbers with adjacent digits differing by five or less.
0
1, 13, 113, 1023, 9293, 84455, 767555, 6975829, 63398983, 576194069, 5236670849, 47592856433, 432541981119, 3931106041007, 35727386890081, 324704080907159, 2951034187922473, 26820121120612837, 243751461731028909
OFFSET
0,2
COMMENTS
[Empirical] a(base,n)=a(base-1,n)+11^(n-1) for base>=5n-4; a(base,n)=a(base-1,n)+11^(n-1)-2 when base=5n-5
FORMULA
G.f.: -(2*x^7+2*x^6-10*x^5-8*x^4+13*x^3+7*x^2-4*x-1) / ((x-1) * (2*x^6+2*x^5-10*x^4-9*x^3+11*x^2+8*x-1)). - Alois P. Heinz, Sep 25 2015
MATHEMATICA
CoefficientList[Series[-(2x^7+2x^6-10x^5-8x^4+13x^3+7x^2-4x-1)/((x-1)(2x^6+2x^5- 10x^4- 9x^3+ 11x^2+8x-1)), {x, 0, 20}], x] (* or *) LinearRecurrence[{9, 3, -20, -1, 12, 0, -2}, {1, 13, 113, 1023, 9293, 84455, 767555, 6975829}, 20] (* Harvey P. Dale, Jun 28 2023 *)
PROG
(S/R) stvar $[N]:(0..M-1) init $[]:=0 asgn $[]->{*} kill +[i in 0..N-2](($[i]`-$[i+1]`>5)+($[i+1]`-$[i]`>5))
CROSSREFS
Cf. Base 13 differing by four or less A126508, three or less A126481, two or less A126400, one or less A126367.
Sequence in context: A164609 A055430 A095680 * A361915 A340844 A127827
KEYWORD
nonn,base
AUTHOR
R. H. Hardin, Dec 28 2006
STATUS
approved