login
A025595
Number of n-move king paths on 8 X 8 board from given corner to any square.
2
1, 3, 18, 105, 684, 4550, 31340, 219555, 1559835, 11177190, 80573373, 583082082, 4230475092, 30745373256, 223692489189, 1628685532071, 11863934648190, 86447927584521, 630040117048380, 4592393936655066, 33477073967039868, 244050825770095095, 1779217416632500479
OFFSET
0,2
LINKS
Alin Bostan, Computer Algebra for Lattice Path Combinatorics, Séminaire de Combinatoire Ph. Flajolet, March 28 2013.
Natalia L. Skirrow, chessboards (section 'the fourierful king of chebyshev')
Index entries for linear recurrences with constant coefficients, signature (9,9,-159,-108,810,900,-513,-729,-27,81).
FORMULA
G.f.: -(48*x^9 +120*x^8 -126*x^7 -457*x^6 -175*x^5 +162*x^4 +75*x^3 -18*x^2 -6*x+1) / ((3*x-1) *(3*x^3-3*x-1) *(3*x^3-9*x^2-3*x+1) *(3*x^3+9*x^2+6*x-1)). - Alois P. Heinz, Jun 25 2012
a(n) = (2/9)^2 * Sum_{i,j=1..7, i,j odd} (1+cos(i*Pi/9)) * (1+cos(j*Pi/9)) * ((1+2*cos(i*Pi/9)) * (1+2*cos(j*Pi/9)) - 1)^n. - Natalia L. Skirrow, Feb 20 2026
MAPLE
b:= proc(n, i, j) option remember;
`if`(n<0 or i<0 or i>7 or j<0 or j>7, 0, `if`(n=0,
1, add(b(n-1, i+r[1], j+r[2]), r=[[1, 1], [1, 0], [1, -1],
[0, 1], [0, -1], [-1, 1], [-1, 0], [-1, -1]])))
end:
a:= n-> b(n, 0, 0):
seq(a(n), n=0..30); # Alois P. Heinz, Jun 25 2012
MATHEMATICA
b[n_, i_, j_] := b[n, i, j] = If[n<0 || i<0 || i>7 || j<0 || j>7, 0, If[n == 0, 1, Sum [b[n-1, i+r[[1]], j+r[[2]]], {r, {{1, 1}, {1, 0}, {1, -1}, {0, 1}, {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}}}]]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 28 2015, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A106328 A391219 A007277 * A151331 A137962 A267662
KEYWORD
nonn,easy
STATUS
approved