login
A126542
Number of base 21 n-digit numbers with adjacent digits differing by five or less.
0
1, 21, 201, 1991, 19931, 200563, 2023003, 20427271, 206365349, 2085257937, 21073012213, 212967505695, 2152331164583, 21752488014247, 219841986401257, 2221842059480575, 22455157743187179, 226944263887382495
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
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 21 differing by four or less A126516, three or less A126489, two or less A126408, one or less A126375.
Sequence in context: A337897 A341399 A125384 * A297906 A298500 A298319
KEYWORD
nonn,base
AUTHOR
R. H. Hardin, Dec 28 2006
STATUS
approved