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!)
A190313 Number of scalene triangles, distinct up to congruence, on an n X n grid (or geoboard). 3
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..41.

Eric Weisstein's World of Mathematics, Geoboard.

Eric Weisstein's World of Mathematics, Scalene Triangle.

FORMULA

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

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 *)

CROSSREFS

Cf. A028419, A189978.

Sequence in context: A222204 A027289 A061317 * A139362 A012763 A006011

Adjacent sequences: A190310 A190311 A190312 * A190314 A190315 A190316

KEYWORD

nonn

AUTHOR

Martin Renner, May 08 2011

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 March 20 05:07 EDT 2023. Contains 361358 sequences. (Running on oeis4.)