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.

Showing 1-6 of 6 results.

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

Original entry on oeis.org

0, 1, 8, 29, 79, 172, 333, 587, 963, 1494, 2228, 3195, 4455, 6050, 8032, 10481, 13464, 17014, 21235, 26190, 31980, 38666, 46388, 55144, 65131, 76449, 89132, 103337, 119184, 136757, 156280, 177796, 201430, 227331, 255668, 286606, 320294, 356884, 396376, 439100, 485427, 535049, 588457, 645803
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    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

Extensions

More terms from Chris Cole (chris(AT)questrel.com), Jun 28 2003
a(36)-a(39) from Martin Renner, May 08 2011

A241237 Number of isosceles triangles, distinct up to congruence, on a centered hexagonal grid of size n.

Original entry on oeis.org

0, 3, 15, 35, 69, 106, 162, 222, 300, 382, 486, 587, 715, 840, 997, 1147, 1313, 1491, 1700, 1890, 2129, 2341, 2598, 2842, 3126, 3394, 3711, 3995, 4341, 4641, 5024, 5349, 5750, 6128, 6540, 6959, 7381, 7772, 8255, 8722, 9252, 9688, 10220, 10698, 11277, 11806, 12381, 12905
Offset: 1

Views

Author

Martin Renner, Apr 17 2014

Keywords

Comments

A centered hexagonal grid of size n is a grid with A003215(n-1) points forming a hexagonal lattice.

Examples

			For n = 2 the three kinds of non-congruent isosceles triangles are the following:
/. *     * *     * .
. * *   . . *   . . *
\. .     . .     * .
		

Crossrefs

Formula

a(n) = A241231(n) - A241236(n).

Extensions

a(7) from Martin Renner, May 31 2014
a(8)-a(21) from Giovanni Resta, May 31 2014
More terms from Bert Dobbelaere, Oct 17 2022

A190313 Number of scalene triangles, distinct up to congruence, on an n X n grid (or geoboard).

Original entry on oeis.org

0, 0, 3, 18, 57, 137, 280, 517, 863, 1368, 2069, 3007, 4218, 5774, 7704, 10109, 13025, 16523, 20671, 25567, 31274, 37891, 45529, 54213, 64082, 75320, 87901, 102014, 117736, 135217, 154606, 176024, 199502, 225290, 253485, 284305, 317811, 354282, 393618, 436202, 482332
Offset: 1

Views

Author

Martin Renner, May 08 2011

Keywords

Crossrefs

Programs

  • Mathematica
    q[n_] :=
      Module[{sqDist, t0, t1, t2, t3},
       (*Squared distances*)
       sqDist = {p_,q_} :> (Floor[p/n] - Floor[q/n])^2 + (Mod[p, n] - Mod[q, n])^2;
       (*Triads of points*)
       t0 = Subsets[Range[0, n^2 - 1], {3, 3}];
       (* Exclude collinear vertices *)
       t1 = Select[t0,
         Det[Map[{Floor[#/n], Mod[#, n], 1} &, {#[[1]], #[[2]], #[[
               3]]}]] != 0 &];
       (*Calculate sides*)
       t2 = Map[{#,
           Sort[{{#[[2]], #[[3]]}, {#[[3]], #[[1]]}, {#[[1]], #[[2]]}} /.
             sqDist]} &, t1];
       (*Exclude not-scalenes*)
       t2 = Select[
         t2, #[[2, 1]] != #[[2, 2]] && #[[2, 2]] != #[[2, 3]] && #[[2,
              3]] != #[[2, 1]] &];
       (* Find groups of congruent triangles *)
       t3 = GatherBy[Range[Length[t2]], t2[[#, 2]] &];
       Return[Length[t3]];
       ];
    Map[q[#] &, Range[10]] (* César Eliud Lozada, Mar 26 2021 *)

Formula

a(n) = A028419(n) - A189978(n).

A190309 Number of acute isosceles triangles, distinct up to congruence, on an n X n grid (or geoboard).

Original entry on oeis.org

0, 0, 2, 5, 11, 19, 29, 40, 58, 74, 94, 113, 141, 168, 201, 227, 267, 304, 348, 390, 438, 483, 537, 590, 657, 709, 776, 837, 913, 979, 1057, 1130, 1225, 1299, 1396, 1472, 1576, 1663, 1768, 1863, 1974
Offset: 1

Views

Author

Martin Renner, May 08 2011

Keywords

Crossrefs

Formula

a(n) = A189978(n) - A190310(n) - A108279(n).

A190310 Number of obtuse isosceles triangles, distinct up to congruence, on an n X n grid (or geoboard).

Original entry on oeis.org

0, 0, 0, 1, 3, 5, 9, 12, 19, 24, 32, 37, 51, 57, 69, 80, 99, 107, 127, 136, 161, 176, 196, 207, 246, 262, 286, 306, 343, 357, 399, 414, 460, 485, 517, 544, 605, 623, 659, 689, 757
Offset: 1

Views

Author

Martin Renner, May 08 2011

Keywords

Crossrefs

Formula

a(n) = A189978(n) - A190309(n) - A108279(n).

A272053 a(n) is the number of equivalence classes of simple, open polygonal chains consisting of two segments and with all three vertices on the lattice points of an n X n grid.

Original entry on oeis.org

0, 2, 19, 76, 215, 481, 946, 1691, 2789, 4356, 6525, 9397, 13128, 17874, 23768, 31071, 39953, 50551, 63141, 77947, 95234, 115223, 138305, 164501, 194344, 228218, 266165, 308688, 356104, 408731, 467166, 531616, 602362, 679952, 764821, 857517
Offset: 0

Views

Author

Alec Jones, Apr 18 2016

Keywords

Comments

The chains are counted up to congruence.
Proof that a(n) = 3*A190313(n) + 2*A189978(n):
Let ABC be a lattice triangle in an n X n grid. If ABC is scalene, then the pairs (BA,AC), (AB,BC), and (AC, CB) form three inequivalent polygonal chains; likewise, if ABC is isosceles and AB is the base of the triangle, then (BA,AC) and (AC,CB) form two distinct polygonal chains, while (BC,CA) is congruent to (AB,BC).
Now consider an arbitrary 2-segment polygonal chain (XY,YZ). By the side-angle-side criterion for triangle congruence, the triangle to which XY and YZ belong is determined up to congruence, and so the proposed formula does not over-count. Thus a(n) = 3*A190313(n) + 2*A189978(n).

Crossrefs

Formula

a(n) = 3*A190313(n) + 2*A189978(n).
Showing 1-6 of 6 results.