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!)
A187452 Number of right isosceles triangles that can be formed from the n^2 points of n X n grid of points (or geoboard). 17
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)
OFFSET
1,2
COMMENTS
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.
LINKS
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
FORMULA
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.
(End)
EXAMPLE
For n=2 if the four points are labeled
ab
cd
then the triangles are abc, abd, acd, bcd,
so a(2)=4.
For n=3, label the points
abc
def
ghi
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
MAPLE
with(linalg):
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:
MATHEMATICA
LinearRecurrence[{4, -5, 0, 5, -4, 1}, {0, 4, 28, 96, 244, 516}, 40] (* Harvey P. Dale, Apr 29 2016 *)
PROG
(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
CROSSREFS
Sequence in context: A294315 A263239 A296015 * A173296 A077595 A201243
KEYWORD
nonn,easy
AUTHOR
Martin Renner, Apr 10 2011, Apr 13 2011
EXTENSIONS
a(10) - a(36) from Nathaniel Johnston, Apr 25 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 July 25 01:41 EDT 2024. Contains 374585 sequences. (Running on oeis4.)