login
A126543
Number of base 22 n-digit numbers with adjacent digits differing by five or less.
0
1, 22, 212, 2112, 21262, 215204, 2183942, 22191818, 225641380, 2294976992, 23345496862, 237497850214, 2416193594602, 24581666342894, 250088998066402, 2544366359893456, 25886037501605214, 263361284829149912
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 22 differing by four or less A126517, three or less A126490, two or less A126409, one or less A126376.
Sequence in context: A022714 A302924 A125385 * A232019 A224330 A223928
KEYWORD
nonn,base
AUTHOR
R. H. Hardin, Dec 28 2006
STATUS
approved