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.
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
Offset: 0
Examples
a(1) = 4*1+5 = 9; a(2) = 4*5+31 = 51; a(3) = 4*15 + 106 = 166; a(4) = 4*36 + 270 = 410.
Links
- Teofil Bogdan and Mircea Dan Rus, Counting the lattice rectangles inside Aztec diamonds and square biscuits, arXiv:2007.13472 [math.CO], 2020.
- Luce ETIENNE, Illustration of a(1), a(2) and a(3).
- Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
Programs
-
Mathematica
LinearRecurrence[{5,-10,10,-5,1},{0,9,51,166,410},40] (* Harvey P. Dale, Jun 27 2020 *)
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.
Comments