login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of base 7 n-digit numbers with adjacent digits differing by two or less.
3

%I #13 Jun 13 2015 00:52:18

%S 1,7,29,125,543,2363,10287,44787,194995,848979,3696331,16093291,

%T 70067867,305065387,1328210699,5782837835,25177641963,109619822123,

%U 477268896747,2077959947307,9047137938475,39389933855019

%N Number of base 7 n-digit numbers with adjacent digits differing by two or less.

%C 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.

%H Sergey Kitaev, Jeffrey Remmel, <a href="http://arxiv.org/abs/1304.4286">(a,b)-rectangle patterns in permutations and words</a>, arXiv:1304.4286 [math.CO], 2013.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (5,-2,-4,2).

%F G.f.: 1 -x*(7-6*x-6*x^2+4*x^3) / ( (x-1)*(2*x^3-2*x^2-4*x+1) ). - _R. J. Mathar_, Jun 06 2013

%o (S/R) stvar $[N]:(0..M-1) init $[]:=0 asgn $[]->{*} kill +[i in 0..N-2](($[i]`-$[i+1]`>2)+($[i+1]`-$[i]`>2))

%Y Cf. Base 7 differing by one or less A126361.

%K nonn,base

%O 0,2

%A _R. H. Hardin_, Dec 28 2006