login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A126531
Number of base 10 n-digit numbers with adjacent digits differing by five or less.
0
1, 10, 80, 660, 5430, 44692, 367826, 3027314, 24915652, 205062892, 1687725824, 13890462738, 114322452324, 940906242802, 7743925534706, 63734705924048, 524554726284436, 4317234336897124, 35532064407664766, 292438978880594940
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
Conjectures from Colin Barker, May 31 2017: (Start)
G.f.: (1 - x)*(1 + 3*x - x^3) / ((1 + x)*(1 - 9*x + 6*x^2 + 3*x^3 - 2*x^4)).
a(n) = 8*a(n-1) + 3*a(n-2) - 9*a(n-3) - a(n-4) + 2*a(n-5) for n>4.
(End)
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 10 differing by four or less A126505, three or less A126478, two or less A126397, one or less A126364.
Sequence in context: A369474 A037509 A037692 * A200162 A165511 A165750
KEYWORD
nonn,base
AUTHOR
R. H. Hardin, Dec 28 2006
STATUS
approved