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-10 of 16 results. Next

A186434 Number of isosceles triangles that can be formed from the n^2 points of n X n grid of points (or geoboard).

Original entry on oeis.org

0, 4, 36, 148, 444, 1064, 2200, 4024, 6976, 11284, 17396, 25620, 36812, 51216, 69672, 92656, 121392, 156092, 198364, 248292, 307988, 377816, 459072, 552216, 660704, 784076, 924340, 1082228, 1261132, 1460408, 1684464, 1931800, 2208368
Offset: 1

Views

Author

Martin Renner, Apr 10 2011, Apr 13 2011

Keywords

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. It would be nice to have a formula. - N. J. A. Sloane, Apr 22 2016
Place all bounding boxes of A279413 that will fit into the n X n grid in all possible positions, and the proper rectangles in two orientations: a(n) = Sum_{i=1..n} Sum_{j=1..i} k * (n-i+1) * (n-j+1) * A279413(i,j) where k=1 when i=j and k=2 otherwise. - Lars Blomberg, Feb 20 2017

Crossrefs

Programs

  • 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:
    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:
    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 IsIsoscelesTriangle([P[a],P[b],P[c]]) then TriangleSet:={op(TriangleSet),[P[a],P[b],P[c]]}; fi; od; od; od; return(nops(TriangleSet)): end:

Extensions

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

A271910 Array read by antidiagonals: T(n,k) = number of ways to choose 3 distinct points from an n X k rectangular grid so that they form an isosceles triangle.

Original entry on oeis.org

0, 0, 0, 0, 4, 0, 0, 10, 10, 0, 0, 16, 36, 16, 0, 0, 24, 68, 68, 24, 0, 0, 32, 108, 148, 108, 32, 0, 0, 42, 150, 248, 248, 150, 42, 0, 0, 52, 200, 360, 444, 360, 200, 52, 0, 0, 64, 252, 488, 672, 672, 488, 252, 64, 0, 0, 76, 312, 620, 932, 1064, 932, 620, 312, 76, 0
Offset: 1

Views

Author

N. J. A. Sloane, Apr 24 2016

Keywords

Comments

The triangle must have nonzero area (three collinear points don't count).

Examples

			Initial rows of the array:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
0, 4, 10, 16, 24, 32, 42, 52, 64, 76, ...
0, 10, 36, 68, 108, 150, 200, 252, 312, 374, ...
0, 16, 68, 148, 248, 360, 488, 620, 768, 924, ...
0, 24, 108, 248, 444, 672, 932, 1204, 1512, 1836, ...
0, 32, 150, 360, 672, 1064, 1510, 1984, 2524, 3092, ...
0, 42, 200, 488, 932, 1510, 2200, 2944, 3792, 4690, ...
0, 52, 252, 620, 1204, 1984, 2944, 4024, 5256, 6568, ...
0, 64, 312, 768, 1512, 2524, 3792, 5256, 6976, 8816, ...
0, 76, 374, 924, 1836, 3092, 4690, 6568, 8816, 11284, ...
...
As a triangle:
0,
0, 0,
0, 4, 0,
0, 10, 10, 0,
0, 16, 36, 16, 0,
0, 24, 68, 68, 24, 0,
0, 32, 108, 148, 108, 32, 0,
0, 42, 150, 248, 248, 150, 42, 0,
0, 52, 200, 360, 444, 360, 200, 52, 0,
0, 64, 252, 488, 672, 672, 488, 252, 64, 0,
...
To illustrate T(2,3)=10: Label the points
1 2 3
4 5 6
There are 8 small isosceles triangles like 124 plus 135 and 246, for a total of 10.
		

Crossrefs

Rows 2,3,4,5 are A271911, A271912, A271913, A271915.
Main diagonal = A186434.

Formula

It appears that for each n >= 2, there is a number K(n) such that row n satisfies the recurrence a(k) = 2*a(k-1)-2*a(k-3)+a(k-4) for k >= K(n). This is based on the fact that the conjectured generating functions for rows 2, 3, 4, 5 have the same denominator, and on Colin Barker's conjectured recurrence for A271911. K(n) is determined by the degree of the numerator of the g.f.
Above conjecture about the recurrence is true for K(n) = (n-1)^2+4 if n is even and K(n) = (n-1)^2+3 if n is odd and not true for smaller K(n). See paper in links. - Chai Wah Wu, May 07 2016

A077435 Number of right triangles whose vertices are lattice points in {1,2,...,n} X {1,2,...,n}.

Original entry on oeis.org

0, 4, 44, 200, 596, 1444, 2960, 5520, 9496, 15332, 23596, 34936, 50020, 69732, 94816, 126176, 164960, 212372, 269620, 337960, 418716, 513444, 623736, 751152, 897776, 1065220, 1255460, 1470680, 1713052, 1984564, 2288304, 2626160, 3000960, 3415124, 3871108
Offset: 1

Views

Author

John W. Layman, Nov 30 2002

Keywords

Comments

It would be nice to have a formula. - N. J. A. Sloane, Jun 29 2016

Examples

			For n=2 if the four points are labeled
  ab
  cd
then the right triangles are abc, abd, acd, bcd, so a(2)=4.
For n=3, label the points
  abc
  def
  ghi
The right triangles are: abd (4*4 ways), acg (4 ways), acd and adf (8 ways each), ace and dbf (4 ways each), for a total of a(3) = 44. - _N. J. A. Sloane_, Jun 30 2016
		

Crossrefs

Formula

Place all bounding boxes of A279433 that will fit into the n X n grid in all possible positions, and the proper rectangles in two orientations: a(n) = Sum_{i=1..n} Sum_{j=1..i} k * (n-i+1) * (n-j+1) * A279433(i,j) where k=1 when i=j and k=2 otherwise. - Lars Blomberg, Mar 01 2017

Extensions

a(1) corrected by Lars Blomberg, Mar 01 2017

A279413 Triangle read by rows: T(n,k), n>=k>=1, is the number of isosceles triangles with integer coordinates that have a bounding box of size n X k.

Original entry on oeis.org

0, 0, 4, 0, 2, 12, 0, 0, 6, 16, 0, 2, 4, 6, 24, 0, 0, 2, 8, 10, 28, 0, 2, 4, 2, 8, 6, 36, 0, 0, 2, 0, 6, 8, 10, 40, 0, 2, 4, 2, 12, 10, 8, 10, 56, 0, 0, 2, 4, 2, 4, 10, 8, 10, 60, 0, 2, 4, 2, 4, 2, 12, 6, 12, 6, 60, 0, 0, 2, 0, 2, 4, 6, 12, 6, 8, 14, 64, 0, 2
Offset: 1

Views

Author

Lars Blomberg, Feb 16 2017

Keywords

Examples

			Triangle begins:
0
0, 4
0, 2, 12
0, 0, 6, 16
0, 2, 4, 6, 24
0, 0, 2, 8, 10, 28
0, 2, 4, 2, 8, 6, 36
0, 0, 2, 0, 6, 8, 10, 40
0, 2, 4, 2, 12, 10, 8, 10, 56
0, 0, 2, 4, 2, 4, 10, 8, 10, 60
0, 2, 4, 2, 4, 2, 12, 6, 12, 6, 60
0, 0, 2, 0, 2, 4, 6, 12, 6, 8, 14, 64
0, 2, 4, 2, 4, 6, 8, 10, 16, 14, 12, 14, 72
0, 0, 2, 0, 2, 4, 2, 8, 14, 4, 6, 12, 18, 76
0, 2, 4, 2, 4, 2, 8, 2, 8, 10, 16, 10, 12, 10, 84
0, 0, 2, 0, 6, 4, 2, 4, 6, 16, 6, 4, 10, 12, 14, 88
0, 2, 4, 2, 4, 2, 8, 2, 16, 6, 16, 10, 16, 6, 24, 10, 104
0, 0, 2, 0, 2, 0, 2, 4, 6, 4, 10, 12, 10, 12, 10, 12, 14, 100
0, 2, 4, 2, 4, 2, 12, 6, 4, 6, 12, 10, 20, 6, 12, 14, 16, 10, 124
0, 0, 2, 0, 2, 0, 2, 0, 2, 4, 6, 12, 10, 12, 10, 12, 18, 12, 10, 112
-----
Denote by 'o' the point adjacent to the two equal sides, and by 'x' the other two.
n=4, k=3:
...x  x...  .o..  ..o.  x...  ...x
o...  ...o  ...x  x...  ...x  x...
...x  x...  x...  ...x  .o..  ..o.
So T(4,3)=6.
-----
n=4,k=4:
o...  ...o  .x..  ..x.  o...  ...o  ..x.  .x..
...x  x...  ....  ....  ....  ....  ...x  x...
....  ....  ...x  x...  ...x  x...  ....  ....
.x..  ..x.  o...  ...o  ..x.  .x..  o...  ...o
-
...x  x...  x...  ...x  o..x  x..o  x...  ...x
.o..  ..o.  ....  ....  ....  ....  ....  ....
....  ....  .o..  ..o.  ....  ....  ....  ....
x...  ...x  ...x  x...  x...  ...x  o..x  x..o
So T(4,4)=16.
		

Crossrefs

See A279415 for right isosceles triangles.
See A280639 for obtuse isosceles triangles.
See A279418 for acute isosceles triangles.
See A279433 for all right triangles.
See A280652 for all obtuse triangles.
See A280653 for all acute triangles.
See A279432 for all triangles.

A108279 a(n) = number of squares with corners on an n X n grid, distinct up to congruence.

Original entry on oeis.org

0, 1, 3, 5, 8, 11, 15, 18, 23, 28, 33, 38, 45, 51, 58, 65, 73, 80, 89, 97, 107, 116, 126, 134, 146, 158, 169, 180, 192, 204, 218, 228, 243, 257, 270, 285, 302, 316, 331, 346, 364, 379, 397, 414, 433, 451, 468, 484, 505, 523, 544, 563, 584, 603, 625
Offset: 1

Views

Author

Hugo Pfoertner, Jun 05 2005

Keywords

Comments

Number of different sizes occurring among the A002415(n) = n^2*(n^2-1)/12 squares that can be drawn using points of an n X n square array as corners.
a(n) is also the number of rectangular isosceles triangles, distinct up to congruence, on an n X n grid (or geoboard). - Martin Renner, May 03 2011

Examples

			a(3)=3 because the 6 different squares that can be drawn on a 3 X 3 square lattice come in 3 sizes:
  4 squares of side length 1:
  x.x.o    o.x.x    o.o.o    o.o.o
  x.x.o    o.x.x    x.x.o    o.x.x
  o.o.o    o.o.o    x.x.o    o.x.x
  1 square of side length sqrt(2):
  o.x.o
  x.o.x
  o.x.o
  1 square of side length 2:
  x.o.x
  o.o.o
  x.o.x
.
a(4)=5 because there are 5 different sizes of squares that can be drawn using the points of a 4 X 4 square lattice:
  x.x.o.o    o.x.o.o    x.o.x.o    o.x.o.o    x.o.o.x
  x.x.o.o    x.o.x.o    o.o.o.o    o.o.o.x    o.o.o.o
  o.o.o.o    o.x.o.o    x.o.x.o    x.o.o.o    o.o.o.o
  o.o.o.o    o.o.o.o    o.o.o.o    o.o.x.o    x.o.o.x
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{v = Table[0, (n - 1)^2]}, Do[v[[k^2 + (w - k)^2]] = 1, {w, 1, n - 1}, {k, 0, w - 1}]; Total[v]]; Array[a, 55](* Jean-François Alcover, Oct 08 2017, after Andrew Howroyd *)
  • PARI
    a(n) = my(v=vector((n-1)^2)); for(w=1, n-1, for(k=0, w-1, v[k^2+(w-k)^2]=1)); vecsum(v); \\ Andrew Howroyd, Sep 17 2017

Extensions

More terms from David W. Wilson, Jun 07 2005

A279415 Triangle read by rows: T(n,k), n>=k>=1, is the number of right isosceles triangles with integral coordinates that have a bounding box of size n X k.

Original entry on oeis.org

0, 0, 4, 0, 2, 4, 0, 0, 4, 4, 0, 0, 2, 4, 4, 0, 0, 0, 4, 4, 4, 0, 0, 0, 2, 4, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 2, 4, 4, 4, 4, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 2, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 2, 4, 4
Offset: 1

Views

Author

Lars Blomberg, Feb 27 2017

Keywords

Examples

			Triangle begins:
0
0,4
0,2,4
0,0,4,4
0,0,2,4,4
0,0,0,4,4,4
0,0,0,2,4,4,4
0,0,0,0,4,4,4,4
0,0,0,0,2,4,4,4,4
0,0,0,0,0,4,4,4,4,4
0,0,0,0,0,2,4,4,4,4,4
0,0,0,0,0,0,4,4,4,4,4,4
0,0,0,0,0,0,2,4,4,4,4,4,4
-------
The right angle is 'o'.
For n=4, k=3:
x...   .o..   ..o.   ...x
...x   ...x   x...   x...
.o..   x...   ...x   ..o.
So T(4,3)=4
-------
For n=4, k=4:
o..x   x..o   x...   ...x
....   ....   ....   ....
....   ....   ....   ....
x...   ...x   o..x   x..o
So T(4,4)=4
		

Crossrefs

Cf. A187452.
See A280639 for obtuse isosceles triangles.
See A279418 for acute isosceles triangles.
See A279413 for all isosceles triangles.
See A279433 for all right triangles.
See A280652 for all obtuse triangles.
See A280653 for all acute triangles.
See A279432 for all triangles.

A334581 Number of ways to choose 3 points that form an equilateral triangle from the A000292(n) points in a regular tetrahedral grid of side length n.

Original entry on oeis.org

0, 0, 4, 24, 84, 224, 516, 1068, 2016, 3528, 5832, 9256, 14208, 21180, 30728, 43488, 60192, 81660, 108828, 142764, 184708, 236088, 298476, 373652, 463524, 570228, 696012, 843312, 1014720, 1213096, 1441512, 1703352, 2002196, 2341848, 2726400, 3160272, 3648180
Offset: 0

Views

Author

Peter Kagey, May 06 2020

Keywords

Comments

a(n) >= 4 * A269747(n).
a(n) >= 4 * A000389(n+3) = A210569(n+2).
a(n) >= 4 * (n-1) + 4 * a(n-1) - 6 * a(n-2) + 4 * a(n-3) - a(n-4) for n >= 4.

Crossrefs

Cf. A000332 (equilateral triangles in triangular grid), A269747 (regular tetrahedra in a tetrahedral grid), A102698 (equilateral triangles in cube), A103158 (regular tetrahedra in cube).

A190317 Number of acute isosceles triangles on an n X n grid.

Original entry on oeis.org

0, 0, 8, 48, 164, 448, 976, 1864, 3328, 5512, 8640, 12984, 18836, 26576, 36584, 49056, 64560, 83640, 106904, 134816, 168004, 206952, 252480, 305360, 366312, 436120, 515864, 605928, 707644, 822120, 950216, 1092784, 1251784, 1427848, 1622416, 1835968, 2070404
Offset: 1

Views

Author

Martin Renner, May 08 2011

Keywords

Comments

Place all bounding boxes of A279418 that will fit into the n X n grid in all possible positions, and the proper rectangles in two orientations: a(n) = Sum(i=1..n, Sum(j=1..i, k * (n-i+1) * (n-j+1) * A279418(i,j))) where k=1 when i=j and k=2 otherwise. - Lars Blomberg, Mar 02 2017

Crossrefs

Formula

a(n) = A186434(n) - A187452(n) - A190318(n).

Extensions

a(10)-a(37) from Nathaniel Johnston, May 09 2011

A190318 Number of obtuse isosceles triangles on an n X n grid.

Original entry on oeis.org

0, 0, 0, 4, 36, 100, 256, 496, 968, 1672, 2736, 4092, 6188, 8764, 12144, 16464, 22224, 28928, 37400, 47076, 59244, 73580, 90344, 109000, 132048, 158000, 187528, 220716, 259348, 301388, 350088, 402792, 463176, 529720, 602888, 683092, 774476, 872100, 978232
Offset: 1

Views

Author

Martin Renner, May 08 2011

Keywords

Comments

Place all bounding boxes of A280639 that will fit into the n X n grid in all possible positions, and the proper rectangles in two orientations: a(n) = Sum(i=1..n, Sum(j=1..i, k * (n-i+1) * (n-j+1) * A280639(i,j))) where k=1 when i=j and k=2 otherwise. - Lars Blomberg, Mar 02 2017

Crossrefs

Formula

a(n) = A186434(n) - A190317(n) - A187452(n).

Extensions

a(10)-a(39) from Nathaniel Johnston, May 09 2011

A271913 Number of ways to choose three distinct points from a 4 X n grid so that they form an isosceles triangle.

Original entry on oeis.org

0, 16, 68, 148, 248, 360, 488, 620, 768, 924, 1096, 1272, 1464, 1660, 1872, 2088, 2320, 2556, 2808, 3064, 3336, 3612, 3904, 4200, 4512, 4828, 5160, 5496, 5848, 6204, 6576, 6952, 7344, 7740, 8152, 8568, 9000, 9436, 9888, 10344, 10816, 11292, 11784, 12280, 12792, 13308, 13840, 14376, 14928, 15484
Offset: 1

Views

Author

N. J. A. Sloane, Apr 24 2016

Keywords

Crossrefs

Row 4 of A271910.

Programs

  • Mathematica
    Join[{0, 16, 68, 148, 248, 360, 488, 620}, LinearRecurrence[{2, 0, -2, 1}, {768, 924, 1096, 1272}, 42]] (* Jean-François Alcover, Sep 03 2018 *)

Formula

Conjectured g.f.: 4*x*(x^10-x^8+2*x^6+x^5+4*x^4+4*x^3-3*x^2-9*x-4)/((x+1)*(x-1)^3).
Conjectured recurrence: a(n) = 2*a(n-1)-2*a(n-3)+a(n-4) for n > 12.
Conjectures from Colin Barker, Apr 25 2016: (Start)
a(n) = -3/2*(143+(-1)^n)+64*n+5*n^2 for n>8.
a(n) = 5*n^2+64*n-216 for n>8 and even.
a(n) = 5*n^2+64*n-213 for n>8 and odd.
(End)
The conjectured g.f. and recurrence are true. See paper in links. - Chai Wah Wu, May 07 2016

Extensions

More terms from Jean-François Alcover, Sep 03 2018
Showing 1-10 of 16 results. Next