login
A126407
Number of base 20 n-digit numbers with adjacent digits differing by two or less.
3
1, 20, 94, 450, 2168, 10486, 50848, 247024, 1201730, 5852530, 28526860, 139144760, 679090456, 3315836420, 16196773236, 79141717426, 386812618952, 1891013450430, 9246370600422, 45218609940844, 221167392509842
OFFSET
0,2
COMMENTS
[Empirical] a(base,n)=a(base-1,n)+5^(n-1) for base>=2n-1; a(base,n)=a(base-1,n)+5^(n-1)-2 when base=2n-2
PROG
(S/R) stvar $[N]:(0..M-1) init $[]:=0 asgn $[]->{*} kill +[i in 0..N-2](($[i]`-$[i+1]`>2)+($[i+1]`-$[i]`>2))
CROSSREFS
Cf. Base 20 differing by one or less A126374.
Sequence in context: A071092 A144359 A124948 * A158446 A221704 A222772
KEYWORD
nonn,base
AUTHOR
R. H. Hardin, Dec 28 2006
STATUS
approved