OFFSET
1,1
COMMENTS
Horizontally or vertically adjacent entries can differ by at most 1. Diagonally adjacent entries thus differ by at most 2.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..800
Index entries for linear recurrences with constant coefficients, signature (16,-31,10).
FORMULA
a(n) = b(n)+c(n)+d(n), where b(1)=1, c(1)=6, d(1)=2, with b(n+1)=3*b(n)+2*c(n)+1*d(n), c(n+1)=12*b(n)+10*c(n)+6*d(n), d(n+1)=2*b(n)+2*c(n)+3*d(n).
G.f.: -x*(8*x^2-23*x+9) / (10*x^3-31*x^2+16*x-1). - Colin Barker, Dec 03 2012
MAPLE
a:= n-> (Matrix([1, 6, 2]). Matrix([[3, 12, 2], [2, 10, 2], [1, 6, 3]])^(n-1) .Matrix([[1], [1], [1]]))[1, 1]: seq(a(n), n=1..20); # Alois P. Heinz, Aug 28 2008
MATHEMATICA
LinearRecurrence[{16, -31, 10}, {9, 121, 1665}, 25] (* Paolo Xausa, Mar 17 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wayne VanWeerthuizen, Apr 05 2008
EXTENSIONS
More terms from Alois P. Heinz, Aug 28 2008
STATUS
approved