|
|
A330805
|
|
Number of squares and rectangles in the interior of the square with vertices (n,0), (0,n), (-n,0) and (0,-n) in a square (x,y)-grid.
|
|
3
|
|
|
0, 9, 51, 166, 410, 855, 1589, 2716, 4356, 6645, 9735, 13794, 19006, 25571, 33705, 43640, 55624, 69921, 86811, 106590, 129570, 156079, 186461, 221076, 260300, 304525, 354159, 409626, 471366, 539835, 615505, 698864, 790416, 890681, 1000195, 1119510, 1249194, 1389831
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Collection: 2*n*(n+1)-ominoes.
Number of squares (all sizes): (8*n^3 + 24*n^2 + 22*n - 3*(-1)^n + 3)/12.
Number of rectangles (all sizes): (8*n^4 + 24*n^3 + 22*n^2 + 3*(-1)^n - 3)/12.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(x + 3)^2/(1 - x)^5.
E.g.f.: (1/6)*exp(x)*x*(54 + 99*x + 40*x^2 + 4*x^3). - Stefano Spezia, Jan 01 2020
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = n*(n + 1)*(4*n^2 + 12*n + 11)/6.
|
|
EXAMPLE
|
a(1) = 4*1+5 = 9; a(2) = 4*5+31 = 51; a(3) = 4*15 + 106 = 166; a(4) = 4*36 + 270 = 410.
|
|
MATHEMATICA
|
LinearRecurrence[{5, -10, 10, -5, 1}, {0, 9, 51, 166, 410}, 40] (* Harvey P. Dale, Jun 27 2020 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|