A126392 Number of base 5 n-digit numbers with adjacent digits differing by two or less.
1, 5, 19, 75, 295, 1161, 4569, 17981, 70763, 278483, 1095951, 4313041, 16973681, 66798773, 262882051, 1034554523, 4071419319, 16022795225, 63056626377, 248155086189, 976597549531, 3843333571747, 15125179200799, 59524119253665
Offset: 0
Links
- S. Kitaev, J. Remmel, (a,b)-rectangle patterns in permutations and words, arXiv:1304.4286 [math.CO]
- Index entries for linear recurrences with constant coefficients, signature (4,0,-1).
Crossrefs
Cf. Base 5 differing by one or less A057960.
Programs
-
Mathematica
LinearRecurrence[{4,0,-1},{1,5,19},30] (* Harvey P. Dale, Apr 27 2018 *)
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]
Extensions
Edited by Charles R Greathouse IV, Aug 05 2010
Comments