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 17 results. Next

A271908 a(n) = A186434(n)/4.

Original entry on oeis.org

0, 1, 9, 37, 111, 266, 550, 1006, 1744, 2821, 4349, 6405, 9203, 12804, 17418, 23164, 30348, 39023, 49591, 62073, 76997, 94454, 114768, 138054, 165176, 196019, 231085, 270557, 315283, 365102, 421116, 482950, 552092, 628401, 712437, 804509, 906217, 1016724, 1137140, 1267836, 1410790, 1564903
Offset: 1

Views

Author

N. J. A. Sloane, Apr 22 2016

Keywords

Comments

It would be nice to have a formula.

Crossrefs

Cf. A186434.

A187452 Number of right 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, 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
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, where the angle at B is a right angle. The triangles can have any orientation.

Examples

			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
		

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

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)

Extensions

a(10) - a(36) 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

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.

A189978 Number of isosceles triangles, distinct up to congruence, on an n X n grid (or geoboard).

Original entry on oeis.org

0, 1, 5, 11, 22, 35, 53, 70, 100, 126, 159, 188, 237, 276, 328, 372, 439, 491, 564, 623, 706, 775, 859, 931, 1049, 1129, 1231, 1323, 1448, 1540, 1674, 1772, 1928, 2041, 2183, 2301, 2483, 2602, 2758, 2898, 3095
Offset: 1

Views

Author

Martin Renner, May 03 2011

Keywords

Examples

			For n=3 the five isosceles triangles are:
**.  *.*  .*.  ..*  *..
*..  ...  *..  *..  ..*
...  *..  .*.  ..*  .*.
		

Crossrefs

Programs

  • Maple
    Triangles:=proc(n) local TriangleSet,i,j,k,l,A,B,C; TriangleSet:={}: for i from 0 to n do for j from 0 to n do for k from 0 to n do for l from 0 to n do A:=i^2+j^2: B:=k^2+l^2: C:=(i-k)^2+(j-l)^2: if A^2+B^2+C^2<>2*(A*B+B*C+C*A) then TriangleSet:={op(TriangleSet),sort([sqrt(A),sqrt(B),sqrt(C)])}: fi: od: od: od: od: return(TriangleSet); end:
    IsIsoscelesTriangle:=proc(T) if T[1]=T[2] or T[1]=T[3] or T[2]=T[3] then true else false fi: end:
    a:=proc(n) local TriangleSet,IsoscelesTriangleSet,i;
    TriangleSet:=Triangles(n): IsoscelesTriangleSet:={}: for i from 1 to nops(TriangleSet) do if IsIsoscelesTriangle(TriangleSet[i]) then IsoscelesTriangleSet:={op(IsoscelesTriangleSet),TriangleSet[i]} fi: od: return(nops(IsoscelesTriangleSet)); end:

Extensions

a(21)-a(40) from Martin Renner, May 08 2011

A241228 Number of isosceles triangles on a centered hexagonal grid of size n.

Original entry on oeis.org

0, 20, 252, 1296, 4232, 10668, 22956, 43832, 77160, 126972, 198176, 296976, 429252, 602876, 825552, 1106376, 1454192, 1879956, 2397024, 3014312, 3747564, 4609476
Offset: 1

Views

Author

Martin Renner, Apr 17 2014

Keywords

Comments

A centered hexagonal grid of size n is a grid with A003215(n-1) points forming a hexagonal lattice.

Crossrefs

Cf. A186434.

Formula

a(n) = A241223(n) - A241227(n).

Extensions

a(7) from Martin Renner, May 31 2014
a(8)-a(22) from Giovanni Resta, May 31 2014

A189416 Number of parallelograms on an n X n grid.

Original entry on oeis.org

0, 1, 22, 158, 674, 2159, 5664, 13004, 26904, 51401, 92094, 156710, 255090, 400359, 608656, 900100, 1299336, 1836461, 2546550, 3472162, 4661898, 6173123, 8071952, 10434600, 13346080, 16905033, 21221558, 26419338, 32636098, 40027283, 48761448
Offset: 1

Views

Author

Martin Renner, Apr 21 2011

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(n-a)*(n-b)*(2*a*b - GCD[a, b]), {a, 1, n-1}, {b, 1, n-1}];
    Array[a, 31] (* Jean-François Alcover, Oct 08 2017, translated from PARI *)
  • PARI
    a(n) = sum(a=1, n-1, sum(b=1, n-1, (n-a)*(n-b)*(2*a*b - gcd(a,b)) )); \\ Andrew Howroyd, Sep 19 2017

Formula

a(n) = Sum_{a=1..n-1} Sum_{b=1..n-1} (n-a)*(n-b)*(2*a*b - gcd(a,b)). - Andrew Howroyd, Sep 19 2017

Extensions

a(6)-a(31) from Nathaniel Johnston, Apr 24 2011

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 17 results. Next