# [seqfan] Re: Lattice Squares

Richard Mathar mathar at strw.leidenuniv.nl
Sat Jul 18 23:33:34 CEST 2009

```Similar to the placement of squares in Z^2 in
http://list.seqfan.eu/pipermail/seqfan/2009-July/001911.html

dr> I wrote a program to find the number of squares whose vertices have
dr> integer coordinates
dr> less than or equal to n in absolute value, with one vertex in each
dr> there are no vertices on the coordinate axes.) It appears that the
dr> number is A014820(n-1).

one could ask for a count of placing isosceles
rectilinear triangles on the square lattice. This is the
case of the square as before but ignoring the place where
the fourth corner would fall.
If the triangles corners are A (first quadrant),
the distance(A,B) = distance(B,C) and angle (A,B,C)=90 degrees,
again 0<|x|,|y|<=n for all 6 coordinates,
I get a(n)= 1,8,37,112,269,552,1017,1728,2761,4200,6141,8688,11957,16072
which seems to be 5n^4/12+n^2/3+1/8-(-1)^n/8, again a 4th degree
polynomial but with a "symmetry breaking" even-odd splitting term.

The four "extra" configurations with a(4)=37 for n=3 relative to the square case
where a(4)=33 are 2 with the 4th point outside the grid

......A
.B.....
.......
.......
.......
.......
..C....

.......
.B.....
......A
.......
.......
.......
C......

plus 2 more where the 4th point falls on one of the two major axes

.......
.B.....
....A..
.......
C......
...D...
.......

....A..
.B.....
.......
.....D.
..C....
.......
.......

RJM

```