OFFSET
1,2
COMMENTS
All terms in the sequence are even, because the rectangles are symmetric. A single move consists of a movement by one row and one column.
LINKS
Isaac S. Friedman, Table of n, a(n) for n = 1..998
Isaac S. Friedman, Java program to find a single term
FORMULA
Empirical g.f.: 2*x^2*(1 + 7*x + 6*x^2 + 8*x^3 + 3*x^4 + x^5) / ((1 - x)^4*(1 + x)^3*(1 + x^2)). - Colin Barker, Dec 04 2016
Empirical: a(n) = (13/24)*(n^3) + ((3*(n mod 2) + 1)/8)*(n^2) - ((28 - 9*(n mod 2))/24)*(n) - (n mod 4)/4.
EXAMPLE
a(3) = (13/24)(3^3) + ((3*(3 mod 2)+1)/8)*(3^2) - ((28-9*(3 mod 2))/24)*(3) - (3 mod 4)/4 = (13/24)(3^3) + (1/2)(3^2) - (19/24)(3) - (3/4) = 16.
Illustration of a(3):
.
. 3 columns
. +---+---+---+
. 4 | 0 | 3 | 0 | 0 + 3 + 0 = 3
. +---+---+---+
. r | 2 | 1 | 2 | 2 + 1 + 2 = 5
. o +---+---+---+
. w | 2 | 1 | 2 | 2 + 1 + 2 = 5
. s +---+---+---+
. | 0 | 3 | 0 | 0 + 3 + 0 = 3
. +---+---+---+
.
Adding the sums for the rows, a(3) = 3 + 5 + 5 + 3 = 16.
MATHEMATICA
CoefficientList[ Series[( 2(x + 7x^2 + 6x^3 + 8x^4 + 3x^5 + x^6))/((x -1)^4 (x + 1)^3 (x^2 +1)), {x, 0, 45}], x] (* or *)
LinearRecurrence[{1, 2, -2, 0, 0, -2, 2, 1, -1}, {0, 2, 16, 32, 76, 114, 204, 276, 428}, 45] (* Robert G. Wilson v, Dec 13 2016 *)
PROG
(Java) See Friedman link
CROSSREFS
KEYWORD
nonn
AUTHOR
Isaac S. Friedman, Dec 03 2016
STATUS
approved