login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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.
From Colin Barker, Oct 06 2019: (Start)
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
Cf. A002415.
Sequence in context: A056359 A088306 A100109 * A209033 A222650 A026961
KEYWORD
nonn,easy
AUTHOR
Derek J. Graves, Oct 05 2019, on behalf of his 2019-20 Geometry class
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 05:26 EDT 2024. Contains 371918 sequences. (Running on oeis4.)