OFFSET
0,8
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: -(267*x^9 +2097*x^8 +4104*x^7 -1898*x^6 -8970*x^5 -2100*x^4 +4314*x^3 +1932*x^2 -171*x-127) *x^7 / ((3*x-1) *(x+1) *(17*x^3+6*x^2-3*x-1) *(3*x^3+9*x^2+6*x-1) *(3*x^3-9*x^2-3*x+1) *(3*x^3-3*x-1) *(x^3+3*x^2-6*x+1)). - Alois P. Heinz, Jun 25 2012
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, i, j]=[0, 0, 7],
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, 7, 7):
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, i, j} == {0, 0, 7}, 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, 7, 7]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 28 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved