This site is supported by donations to The OEIS Foundation.



Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A187452 Number of right isosceles triangles that can be formed from the n^2 points of n X n grid of points (or geoboard). 15
0, 4, 28, 96, 244, 516, 968, 1664, 2680, 4100, 6020, 8544, 11788, 15876, 20944, 27136, 34608, 43524, 54060, 66400, 80740, 97284, 116248, 137856, 162344, 189956, 220948, 255584, 294140, 336900, 384160, 436224, 493408, 556036, 624444, 698976, 779988, 867844 (list; graph; refs; listen; history; text; internal format)



This counts triples of distinct points A,B,C such that A,B,C are the vertices of an isosceles triangle with nonzero area, where the angle at B is a right angle. The triangles can have any orientation.


Nathaniel Johnston and Colin Barker, Table of n, a(n) for n = 1..1000 [first 73 terms from Nathaniel Johnston]

Margherita Barile, MathWorld -- Geoboard.

Jessica Gonzalez, Illustration of a(3)=28

Nathaniel Johnston, C program for computing terms

Index entries for linear recurrences with constant coefficients, signature (4,-5,0,5,-4,1).


Empirical: a(n)=4*a(n-1)-5*a(n-2)+5*a(n-4)-4*a(n-5)+a(n-6). [R. H. Hardin, Apr 30 2011]

Empirical g.f.: 4*x*(x^2+3*x+1)/((1+x)*(1-x)^5). - N. J. A. Sloane, Apr 12 2016

Both the recurrence and the g.f. are true. For proof see [Paper in preparation]. - Warren D. Smith, Apr 17 2016

From Colin Barker, Apr 25 2016: (Start)

a(n) = (3-3*(-1)^n-16*n^2+10*n^4)/24.

a(n) = (5*n^4-8*n^2)/12 for n even.

a(n) = (5*n^4-8*n^2+3)/12 for n odd.



For n=2 if the four points are labeled



then the triangles are abc, abd, acd, bcd,

so a(2)=4.

For n=3, label the points




The triangles are: abd (4*4 ways), acg (4 ways), ace and dbf (4 ways each), for a total of a(3) = 28. - N. J. A. Sloane, Jun 30 2016



IsTriangle:=proc(points) local a, b, c; a:=points[3]-points[2]: b:=points[3]-points[1]: c:=points[2]-points[1]: if evalf(norm(a, 2)+norm(b, 2))>evalf(norm(c, 2)) and evalf(norm(a, 2)+norm(c, 2))>evalf(norm(b, 2)) and evalf(norm(b, 2)+norm(c, 2))>evalf(norm(a, 2)) then true: else false: fi: end:

IsRectangularTriangle:=proc(points) local a, b, c; a:=points[3]-points[2]: b:=points[3]-points[1]: c:=points[2]-points[1]: if IsTriangle(points) then if dotprod(a, b)=0 or dotprod(a, c)=0 or dotprod(b, c)=0 then true: else false: fi: else false: fi; end:

IsIsoscelesTriangle:=proc(points) local a, b, c; a:=points[3]-points[2]: b:=points[3]-points[1]: c:=points[2]-points[1]: if IsTriangle(points) then if norm(a, 2)=norm(b, 2) or norm(a, 2)=norm(c, 2) or norm(b, 2)=norm(c, 2) then true: else false: fi: else false: fi; end:

IsRectangularIsoscelesTriangle:=proc(points) if IsRectangularTriangle(points) and IsIsoscelesTriangle(points) then true: else false: fi: end:

a:=proc(n) local P, TriangleSet, i, j, a, b, c; P:=[]: for i from 0 to n do for j from 0 to n do P:=[op(P), [i, j]]: od; od; TriangleSet:={}: for a from 1 to nops(P) do for b from a+1 to nops(P) do for c from b+1 to nops(P) do if IsRectangularIsoscelesTriangle([P[a], P[b], P[c]]) then TriangleSet:={op(TriangleSet), [P[a], P[b], P[c]]}; fi; od; od; od; return(nops(TriangleSet)): end:


LinearRecurrence[{4, -5, 0, 5, -4, 1}, {0, 4, 28, 96, 244, 516}, 40] (* Harvey P. Dale, Apr 29 2016 *)


(PARI) concat(0, Vec(4*x^2*(1+3*x+x^2)/((1-x)^5*(1+x)) + O(x^50))) \\ Colin Barker, Apr 25 2016


Cf. A045996, A077435, A186434, A189416.

Sequence in context: A294315 A263239 A296015 * A173296 A077595 A201243

Adjacent sequences:  A187449 A187450 A187451 * A187453 A187454 A187455




Martin Renner, Apr 10 2011, Apr 13 2011


a(10) - a(36) from Nathaniel Johnston, Apr 25 2011



Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 14 12:28 EST 2018. Contains 318097 sequences. (Running on oeis4.)