login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A126392 Number of base 5 n-digit numbers with adjacent digits differing by two or less. 3
1, 5, 19, 75, 295, 1161, 4569, 17981, 70763, 278483, 1095951, 4313041, 16973681, 66798773, 262882051, 1034554523, 4071419319, 16022795225, 63056626377, 248155086189, 976597549531, 3843333571747, 15125179200799, 59524119253665 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
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.
LINKS
S. Kitaev, J. Remmel, (a,b)-rectangle patterns in permutations and words, arXiv:1304.4286 [math.CO]
FORMULA
a(n) = 4*a(n-1)-a(n-3). G.f.: -(x^2-x-1)/(x^3-4*x+1). [Colin Barker, Nov 25 2012]
MATHEMATICA
LinearRecurrence[{4, 0, -1}, {1, 5, 19}, 30] (* Harvey P. Dale, Apr 27 2018 *)
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 5 differing by one or less A057960.
Sequence in context: A295374 A212403 A098913 * A206373 A149767 A149768
KEYWORD
nonn,base
AUTHOR
R. H. Hardin, Dec 28 2006
EXTENSIONS
Edited by Charles R Greathouse IV, Aug 05 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 3 04:18 EST 2024. Contains 370499 sequences. (Running on oeis4.)