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 13 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

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.

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

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

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

Original entry on oeis.org

0, 24, 108, 248, 444, 672, 932, 1204, 1512, 1836, 2188, 2548, 2936, 3332, 3756, 4192, 4656, 5128, 5628, 6136, 6672, 7216, 7788, 8368, 8976, 9592, 10236, 10888, 11568, 12256, 12972, 13696, 14448, 15208, 15996, 16792
Offset: 1

Views

Author

N. J. A. Sloane, Apr 24 2016

Keywords

Crossrefs

Row 5 of A271910.

Programs

  • Mathematica
    Join[{0, 24, 108, 248, 444, 672, 932, 1204, 1512, 1836, 2188, 2548, 2936, 3332}, LinearRecurrence[{2, 0, -2, 1}, {3756, 4192, 4656, 5128}, 20]] (* Jean-François Alcover, Sep 03 2018 *)

Formula

Conjectured g.f.: 4*x* (x^16-x^14+2*x^10+2*x^9-x^8-x^7 + 5*x^6+6*x^5+6*x^4+x^3-8*x^2-15*x-6) /((x+1)*(x-1)^3).
Conjectured recurrence: a(n) = 2*a(n-1)-2*a(n-3)+a(n-4) for n > 18.
The conjectured g.f. and recurrence are true. See paper in links. - Chai Wah Wu, May 07 2016

A334881 Number of squares in 3-dimensional space whose four vertices have coordinates (x,y,z) in the set {1,...,n}.

Original entry on oeis.org

0, 0, 6, 54, 240, 810, 2274, 5304, 10752, 19992, 34854, 57774, 91200, 139338, 206394, 296832, 417120, 575556, 779238, 1037514, 1359792, 1760694, 2251362, 2845140, 3554976, 4404876, 5416278, 6605946, 7996896, 9621678, 11500962, 13667772, 16143552, 18973608, 22190406
Offset: 0

Views

Author

Peter Kagey, May 14 2020

Keywords

Comments

a(n) >= 3*n*A002415(n).

Examples

			For n = 5, one such square has vertex set {(2,1,1), (5,4,1), (4,5,5), (1,2,5)}.
		

Crossrefs

Cf. A002415 (squares in square grid), A098928 (cubes in cube grid).

Extensions

a(7)-a(12) from Pontus von Brömssen, May 15 2020
a(13)-a(20) from Peter Kagey, Jul 29 2020 via Mathematics Stack Exchange link
Terms a(21) and beyond from Zachary Kaplan, Sep 01 2020, via Mathematics Stack Exchange link

A271914 Symmetric array read by antidiagonals: T(n,k) (n>=1, k>=1) = maximal number of points that can be chosen in an n X k rectangular grid such that no three distinct points form an isosceles triangle.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 4, 4, 4, 5, 4, 4, 4, 5, 6, 5, 5, 5, 5, 6, 7, 6, 6, 6, 6, 6, 7, 8, 7, 8, 7, 7, 8, 7, 8, 9, 8, 8, 8, 8, 8, 8, 8, 9, 10, 9, 10, 9, 9, 9, 9, 10, 9, 10
Offset: 1

Views

Author

Rob Pratt and N. J. A. Sloane, Apr 24 2016

Keywords

Comments

It is conjectured that T(n,k) <= n+k-1.
The array is symmetric: T(n,k) = T(k,n).
The main diagonal T(n,n) appears to equal 2n-2 for n>1. (This diagonal is presently A271907, but if it really is 2n-2 that entry may be recycled.)
The triangle must have nonzero area (three collinear points don't count as a triangle).

Examples

			The array begins:
   1,  2,  3,  4,  5,  6,  7,  8,  9, 10, ...
   2,  2,  4,  4,  5,  6,  7,  8,  9, 10, ...
   3,  4,  4,  5,  6,  8,  8, 10, 10, 12, ...
   4,  4,  5,  6,  7,  8,  9, 10, 11, 12, ...
   5,  5,  6,  7,  8,  9, 10, 12, 12, 14, ...
   6,  6,  8,  8,  9, 10, 11, 12, 12, 14, ...
   7,  7,  8,  9, 10, 11, 12, 13, 14, 16, ...
   8,  8, 10, 10, 12, 12, 13, 14, 16, 16, ...
   9,  9, 10, 11, 12, 12, 14, 16, 16, 18, ...
  10, 10, 12, 12, 14, 14, 16, 16, 18, 18, ...
  ...
As a triangle:
   1,
   2,  2,
   3,  2,  3,
   4,  4,  4,  4,
   5,  4,  4,  4,  5,
   6,  5,  5,  5,  5,  6,
   7,  6,  6,  6,  6,  6,  7,
   8,  7,  8,  7,  7,  8,  7,  8,
   9,  8,  8,  8,  8,  8,  8,  8,  9,
  10,  9, 10,  9,  9,  9,  9, 10,  9, 10,
  ...
Illustration for T(2,3) = 4:
XOX
XOX
Illustration for T(2,5) = 5:
XXXXX
OOOOO
Illustration for T(3,5) = 6 (this left edge + top edge construction - or a slight modification of it - works in many cases):
OXXXX
XOOOO
XOOOO
Illustration for T(3,6) = 8:
XXOOXX
OOOOOO
XXOOXX
Illustration for T(3,8) = 10:
OXXXXXXO
XOOOOOOX
XOOOOOOX
Illustration for T(6,9) = 12:
OXOOOOOOX
OOXXXXXXO
OOOOOOOOO
OXOOOOOOX
OXOOOOOOX
OOOOOOOOO
From _Bob Selcoe_, Apr 24 2016 (Start)
Two symmetric illustrations for T(6,9) = 12:
Grid 1:
X X O O O O O X X
O O O O O O O O O
O O O O O O O O O
O X X X O X X X O
X O O O O O O O X
O O O O O O O O O
Grid 2:
X O O O O O O O X
X O O O O O O O X
O O O O O O O O O
O X X X O X X X O
X O O O O O O O X
O O O O O O O O O
(Note that a symmetric solution is obtained for T(5,9) = 12 by removing row 6)
(End)
		

Crossrefs

Cf. A271910.
Main diagonal is A271907.

Formula

From Chai Wah Wu, Nov 30 2016: (Start)
T(n,k) >= max(n,k).
T(n,max(k,m)) <= T(n,k+m) <= T(n,k) + T(n,m).
T(n,1) = n.
T(n,2) = n for n > 3.
For n > 4, T(n,3) >= n+1 if n is odd and T(n,3) >= n+2 if n is even.
Conjecture: For n > 4, T(n,3) = n+1 if n is odd and T(n,3) = n+2 if n is even.
Conjecture: If n is even, then T(n,k) <= n+k-2 for k >= 2n.
(End)

A272624 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 obtuse isosceles triangle of nonzero area.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 4, 4, 4, 4, 4, 0, 0, 8, 8, 14, 14, 8, 8, 0, 0, 12, 18, 24, 36, 24, 18, 12, 0, 0, 18, 28, 44, 58, 58, 44, 28, 18, 0, 0, 24, 44, 64, 94, 100, 94, 64, 44, 24, 0, 0, 32, 60, 96, 130, 160, 160, 130, 96
Offset: 1

Views

Author

Chai Wah Wu, May 07 2016

Keywords

Comments

A271910(n) = a(n) + A272625(n) + A272626(n).

Crossrefs

Formula

T(n,k) = 2*T(n,k-1)-2*T(n,k-3)+T(n,k-4) for k > max(7,(n-1)^2+2) if n is odd and for k > (n-1)^2+3) if n is even.

A272625 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 acute isosceles triangle of nonzero area.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 18, 18, 0, 0, 0, 0, 30, 48, 30, 0, 0, 0, 0, 44, 84, 84, 44, 0, 0, 0, 0, 60, 128, 164, 128, 60, 0, 0, 0, 0, 78, 176, 264, 264, 176, 78, 0, 0, 0, 0, 98, 228, 374, 448, 374, 228, 98, 0, 0, 0, 0, 120, 284, 492, 650
Offset: 1

Views

Author

Chai Wah Wu, May 07 2016

Keywords

Comments

A271910(n) = A272624(n) + a(n) + A272626(n).

Crossrefs

Formula

T(n,k) = 3*T(n,k-1)-3*T(n,k-2)+T(n,k-3) for k > (n-1)^2+1.

A272626 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 a right isosceles triangle of nonzero area.

Original entry on oeis.org

0, 0, 0, 0, 4, 0, 0, 10, 10, 0, 0, 16, 28, 16, 0, 0, 22, 50, 50, 22, 0, 0, 28, 74, 96, 74, 28, 0, 0, 34, 98, 150, 150, 98, 34, 0, 0, 40, 122, 208, 244, 208, 122, 40, 0, 0, 46, 146, 268, 350, 350, 268, 146, 46, 0, 0, 52, 170, 328, 464, 516, 464, 328, 170, 52, 0
Offset: 1

Views

Author

Chai Wah Wu, May 07 2016

Keywords

Comments

A271910(n) = A272624(n) + A272625(n) + a(n).

Crossrefs

Formula

T(n,k) = 2*T(n,k-1)-T(n,k-2) for k > max(5,(n-1)^2).
Showing 1-10 of 13 results. Next