A126475 Number of base 7 n-digit numbers with adjacent digits differing by three or less.
1, 7, 37, 203, 1111, 6083, 33305, 182349, 998383, 5466269, 29928491, 163862147, 897165287, 4912089625, 26894291201, 147249532159, 806209189861, 4414093873755, 24167703582839, 132321131623579, 724474371929041
Offset: 0
Formula
Conjectures from Colin Barker, Jun 01 2017: (Start)
G.f.: (1 + 2*x - x^2 - x^3) / (1 - 5*x - 3*x^2 + 2*x^3 + x^4).
a(n) = 5*a(n-1) + 3*a(n-2) - 2*a(n-3) - a(n-4) for n>3.
(End)
Comments