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.

A028419 Congruence classes of triangles which can be drawn using lattice points in n X n grid as vertices.

This page as a plain text file.
%I A028419 #43 May 11 2016 16:54:44
%S A028419 0,1,8,29,79,172,333,587,963,1494,2228,3195,4455,6050,8032,10481,
%T A028419 13464,17014,21235,26190,31980,38666,46388,55144,65131,76449,89132,
%U A028419 103337,119184,136757,156280,177796,201430,227331,255668,286606,320294,356884,396376,439100,485427,535049,588457,645803
%N A028419 Congruence classes of triangles which can be drawn using lattice points in n X n grid as vertices.
%H A028419 Ron Knott, <a href="/A028419/b028419.txt">Table of n, a(n) for n = 0..60</a>
%H A028419 D. Rusin, <a href="http://www.math.niu.edu/~rusin/known-math/97/triangles.grid">Lattice Problem (Triangles)</a> [Dead link]
%H A028419 D. Rusin, <a href="/A028419/a028419.grid.txt">Lattice Problem (Triangles)</a> [Cached copy]
%p A028419 a:=proc(n) local TriangleSet,i,j,k,l,A,B,C; TriangleSet:={}: for i from 0 to n do for j from 0 to n do for k from 0 to n do for l from 0 to n do A:=i^2+j^2: B:=k^2+l^2: C:=(i-k)^2+(j-l)^2: if A^2+B^2+C^2<>2*(A*B+B*C+C*A) then TriangleSet:={op(TriangleSet),sort([sqrt(A),sqrt(B),sqrt(C)])}: fi: od: od: od: od: return(nops(TriangleSet)); end: # _Martin Renner_, May 03 2011
%Y A028419 Cf. A028492, A189979, A190021, A190022, A189978, A190313, A189978, A190313.
%K A028419 nonn
%O A028419 0,3
%A A028419 _David J. Rusin_
%E A028419 More terms from Chris Cole (chris(AT)questrel.com), Jun 28 2003
%E A028419 a(36)-a(39) from _Martin Renner_, May 08 2011