cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A108279 a(n) = number of squares with corners on an n X n grid, distinct up to congruence.

This page as a plain text file.
%I A108279 #28 Jun 24 2022 17:17:50
%S A108279 0,1,3,5,8,11,15,18,23,28,33,38,45,51,58,65,73,80,89,97,107,116,126,
%T A108279 134,146,158,169,180,192,204,218,228,243,257,270,285,302,316,331,346,
%U A108279 364,379,397,414,433,451,468,484,505,523,544,563,584,603,625
%N A108279 a(n) = number of squares with corners on an n X n grid, distinct up to congruence.
%C A108279 Number of different sizes occurring among the A002415(n) = n^2*(n^2-1)/12 squares that can be drawn using points of an n X n square array as corners.
%C A108279 a(n) is also the number of rectangular isosceles triangles, distinct up to congruence, on an n X n grid (or geoboard). - _Martin Renner_, May 03 2011
%H A108279 Andrew Howroyd, <a href="/A108279/b108279.txt">Table of n, a(n) for n = 1..1000</a>
%H A108279 Henry Bottomley, <a href="/A002415/a002415.gif">Illustration of initial terms of A002415</a>
%e A108279 a(3)=3 because the 6 different squares that can be drawn on a 3 X 3 square lattice come in 3 sizes:
%e A108279   4 squares of side length 1:
%e A108279   x.x.o    o.x.x    o.o.o    o.o.o
%e A108279   x.x.o    o.x.x    x.x.o    o.x.x
%e A108279   o.o.o    o.o.o    x.x.o    o.x.x
%e A108279   1 square of side length sqrt(2):
%e A108279   o.x.o
%e A108279   x.o.x
%e A108279   o.x.o
%e A108279   1 square of side length 2:
%e A108279   x.o.x
%e A108279   o.o.o
%e A108279   x.o.x
%e A108279 .
%e A108279 a(4)=5 because there are 5 different sizes of squares that can be drawn using the points of a 4 X 4 square lattice:
%e A108279   x.x.o.o    o.x.o.o    x.o.x.o    o.x.o.o    x.o.o.x
%e A108279   x.x.o.o    x.o.x.o    o.o.o.o    o.o.o.x    o.o.o.o
%e A108279   o.o.o.o    o.x.o.o    x.o.x.o    x.o.o.o    o.o.o.o
%e A108279   o.o.o.o    o.o.o.o    o.o.o.o    o.o.x.o    x.o.o.x
%t A108279 a[n_] := Module[{v = Table[0, (n - 1)^2]}, Do[v[[k^2 + (w - k)^2]] = 1, {w, 1, n - 1}, {k, 0, w - 1}]; Total[v]]; Array[a, 55](* _Jean-François Alcover_, Oct 08 2017, after _Andrew Howroyd_ *)
%o A108279 (PARI)
%o A108279 a(n) = my(v=vector((n-1)^2)); for(w=1, n-1, for(k=0, w-1, v[k^2+(w-k)^2]=1)); vecsum(v); \\ _Andrew Howroyd_, Sep 17 2017
%Y A108279 Cf. A002415, A024206, A187452.
%K A108279 nonn
%O A108279 1,3
%A A108279 _Hugo Pfoertner_, Jun 05 2005
%E A108279 More terms from _David W. Wilson_, Jun 07 2005