cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A126474 Number of arrays in [1..6]^n with adjacent elements differing by three or less.

Original entry on oeis.org

1, 6, 30, 154, 788, 4034, 20650, 105708, 541122, 2770018, 14179796, 72586754, 371573530, 1902094812, 9736874082, 49843318162, 255149275268, 1306115946338, 6686042370634, 34226029248972, 175203956722818
Offset: 0

Views

Author

R. H. Hardin, Dec 27 2006

Keywords

Comments

[Empirical] a(base,n)=a(base-1,n)+7^(n-1) for base>=3n-2; a(base,n)=a(base-1,n)+7^(n-1)-2 when base=3n-3
Original name: Number of base 6 n-digit numbers with adjacent digits differing by three or less.

Examples

			For n=2 the a(2)=30 solutions are [1, 1], [1, 2], [1, 3], [1, 4], [2, 1], [2, 2], [2, 3], [2, 4], [2, 5], [3, 1], [3, 2], [3, 3], [3, 4], [3, 5], [3, 6], [4, 1], [4, 2], [4, 3], [4, 4], [4, 5], [4, 6], [5, 2], [5, 3], [5, 4], [5, 5], [5, 6], [6, 3], [6, 4], [6, 5], [6, 6]. - _Robert Israel_, Jan 23 2018
		

Crossrefs

Cf. Base 6 differing by two or less A126393, one or less A126360.

Programs

  • Maple
    f:= gfun:-rectoproc({a(n) = 5*a(n-1) + a(n-2) - 2*a(n-3),a(0)=1,a(1)=6,a(2)=30},a(n),remember):
    map(f, [$0..30]); # Robert Israel, Jan 23 2018

Formula

Conjectures from Colin Barker, Jan 20 2017: (Start)
a(n) = 5*a(n-1) + a(n-2) - 2*a(n-3) for n>2.
G.f.: (1 + x - x^2) / (1 - 5*x - x^2 + 2*x^3).
(End)
From Robert Israel, Jan 23 2018: (Start)
a(n) = e^T M^(n-1) e where e = [1,1,1,1,1,1]^T and M is the 6 X 6 matrix with entries M(i,j) = 1 if |i-j|<=3, 0 otherwise.
The fact that (M^3-5*M^2-M+2I) e = 0 implies Colin Barker's recursion, and the G.f. follows. (End)