|
|
A328152
|
|
a(n) is the number of squares of side length greater than 1 having vertices at the points of an n X n grid of dots.
|
|
1
|
|
|
0, 0, 2, 11, 34, 80, 160, 287, 476, 744, 1110, 1595, 2222, 3016, 4004, 5215, 6680, 8432, 10506, 12939, 15770, 19040, 22792, 27071, 31924, 37400, 43550, 50427, 58086, 66584, 75980, 86335, 97712, 110176, 123794, 138635, 154770, 172272, 191216, 211679, 233740
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) = n^2*(n^2 - 1)/12 - (n - 1)^2.
G.f.: x^3*(2 - x)*(1 + x) / (1 - x)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>5.
a(n) = (-12 + 24*n - 13*n^2 + n^4) / 12.
(End)
E.g.f.: 1 + (1/12)*exp(x)*(-12 + 12*x - 6*x^2 + 6*x^3 + x^4). - Stefano Spezia, Oct 06 2019
|
|
EXAMPLE
|
On the 4 X 4 grid we have: four 2 X 2 squares, four sqrt(2) X sqrt(2) squares, two sqrt(5) X sqrt(5) squares, and one 3 X 3 square. Hence, a(4) = 11.
|
|
MATHEMATICA
|
Table[(n^4 - n^2)/12 - (n - 1)^2, {n, 1, 41}]
|
|
PROG
|
(PARI) a(n) = n^2*(n^2 - 1)/12 - (n - 1)^2; \\ Michel Marcus, Oct 06 2019
(PARI) concat([0, 0], Vec(x^3*(2 - x)*(1 + x) / (1 - x)^5 + O(x^40))) \\ Colin Barker, Oct 06 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|