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.

Previous Showing 11-17 of 17 results.

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

A189415 Number of trapezoids on an n X n grid (or geoboard).

Original entry on oeis.org

0, 1, 50, 490, 2618, 9519, 28432, 70796, 157912, 321161, 610482, 1082570, 1848362, 3003015, 4716792, 7204604, 10730528, 15530189, 22093410, 30723078, 42146178, 56981411, 75952240, 99685104, 129757248
Offset: 1

Views

Author

Martin Renner, Apr 21 2011

Keywords

Crossrefs

Extensions

a(6)-a(25) from Nathaniel Johnston, Apr 25 2011

A279414 a(n) is the total number of isosceles triangles having a bounding box n X k where k is in the range 1 to n inclusive.

Original entry on oeis.org

0, 4, 14, 22, 36, 48, 58, 66, 104, 100, 110, 118, 164, 148, 174, 174, 232, 200, 266, 226, 300, 272, 290, 282, 412, 332, 362, 358, 440, 376, 494, 386, 572, 464, 490, 490, 660, 476, 546, 562, 756, 552, 718, 582, 760, 692, 682, 634, 1004, 716, 862, 746, 900, 744
Offset: 1

Views

Author

Lars Blomberg, Feb 16 2017

Keywords

Comments

Row sums of A279413.

Crossrefs

A190312 Number of scalene triangles on an n X n grid (or geoboard).

Original entry on oeis.org

0, 0, 40, 368, 1704, 5704, 15400, 36096, 75632, 145968, 263592, 451392, 738360, 1163552, 1774840, 2632344, 3808992, 5394752, 7493936, 10233832, 13759008, 18241312, 23877984, 30896984, 39551456, 50137240, 62983128, 78459880
Offset: 1

Views

Author

Martin Renner, May 08 2011

Keywords

Crossrefs

Programs

  • Mathematica
    q[n_] :=
      Module[{sqDist, t0, t1, t2},
       (* Squared distances *)
       sqDist = {p_, q_} :> (Floor[p/n] - Floor[q/n])^2 + (Mod[p, n] - Mod[q, n])^2;
       (* Triads of points *)
       t0 = Subsets[Range[0, n^2 - 1], {3, 3}];
       (* Exclude collinear vertices *)
       t1 = Select[t0, Det[Map[{Floor[#/n], Mod[#, n], 1} &, {#[[1]], #[[2]], #[[
               3]]}]] != 0 &];
       (* Calculate sides *)
       t2 = Map[{#,
        Sort[{{#[[2]], #[[3]]}, {#[[3]], #[[1]]}, {#[[1]], #[[2]]}} /. sqDist]}&, t1];
       (* Select scalenes *)
       t2 = Select[t2,
          #[[2, 1]] != #[[2, 2]] && #[[2, 2]] != #[[2, 3]] && #[[2,3]] != #[[2, 1]] &];
       Return[Length[t2]];
       ];
    Map[q[#] &, Range[9]] (* César Eliud Lozada, Mar 26 2021 *)

Formula

a(n) = A045996(n) - A186434(n).

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

Original entry on oeis.org

0, 4, 10, 16, 24, 32, 42, 52, 64, 76, 90, 104, 120, 136, 154, 172, 192, 212, 234, 256, 280, 304, 330, 356, 384, 412, 442, 472, 504, 536, 570, 604, 640, 676, 714, 752, 792, 832, 874, 916, 960, 1004, 1050, 1096, 1144, 1192, 1242, 1292, 1344, 1396, 1450, 1504
Offset: 1

Views

Author

N. J. A. Sloane, Apr 24 2016

Keywords

Examples

			n=3: Label the points
1 2 3
4 5 6
There are 8 small isosceles triangles like 124 plus 135 and 246, so a(3) = 10.
		

Crossrefs

Row 2 of A271910.
Same start as, but totally different from, 2*A213707.

Programs

  • Mathematica
    LinearRecurrence[{2,0,-2,1},{0,4,10,16},60] (* Harvey P. Dale, May 10 2018 *)

Formula

Conjectured g.f.: 2*x*(2*x^2-x-2)/((x+1)*(x-1)^3). It would be nice to have a proof!
Conjectures from Colin Barker, Apr 24 2016: (Start)
a(n) = (-1+(-1)^n+16*n+2*n^2)/4, or equivalently, a(n) = (n^2+8*n)/2 if n even, (n^2+8*n-1)/2 if n odd.
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4) for n>4. (End)
The conjectured g.f. and recurrence are true. See paper in links. - Chai Wah Wu, May 07 2016
a(n) = round(n*(n/2+3)) - 4. - Bill McEachen, Aug 10 2025

Extensions

More terms from Harvey P. Dale, May 10 2018

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

Original entry on oeis.org

0, 10, 36, 68, 108, 150, 200, 252, 312, 374, 444, 516, 596, 678, 768, 860, 960, 1062, 1172, 1284, 1404, 1526, 1656, 1788, 1928, 2070, 2220, 2372, 2532, 2694, 2864, 3036, 3216, 3398, 3588, 3780, 3980, 4182, 4392, 4604, 4824, 5046, 5276, 5508, 5748, 5990, 6240, 6492, 6752, 7014, 7284, 7556
Offset: 1

Views

Author

N. J. A. Sloane, Apr 24 2016

Keywords

Examples

			n=2: Label the points
1 2 3
4 5 6
There are 8 small isosceles triangles like 124 plus 135 and 246, so a(2) = 10.
		

Crossrefs

Row 3 of A271910.

Programs

  • Mathematica
    Join[{0, 10}, LinearRecurrence[{2, 0, -2, 1}, {36, 68, 108, 150}, 50]] (* Jean-François Alcover, Oct 10 2018 *)

Formula

Conjectured g.f.: 2*x*(2*x^4+4*x^3+2*x^2-8*x-5)/((x+1)*(x-1)^3).
Conjectured recurrence: a(n) = 2*a(n-1)-2*a(n-3)+a(n-4) for n > 6.
Conjectures from Colin Barker, Apr 25 2016: (Start)
a(n) = (-3*(47+(-1)^n)+64*n+10*n^2)/4 for n>2.
a(n) = (5*n^2+32*n-72)/2 for n>2 and even.
a(n) = (5*n^2+32*n-69)/2 for n>2 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, Oct 10 2018

A358532 a(n) is the row position of the next open point in the structure generated by adding the largest diamond possible at the next open point on a triangular grid of side n. See Comments and Example sections for more details.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 4, 1, 3, 7, 1, 3, 6, 4, 10, 1, 9, 4, 7, 9, 5, 14, 1, 11, 5, 7, 8, 11, 14, 19, 1, 6, 6, 24, 9, 14, 20, 1, 8, 8, 8, 20, 8, 19, 24, 30, 15, 19, 19, 19, 27, 1, 19, 15, 16, 20, 28, 8, 39, 11, 24, 1, 11, 16, 26, 28, 29, 30, 39, 50, 20, 31, 32, 33
Offset: 1

Views

Author

John Tyler Rascoe, Nov 20 2022

Keywords

Comments

A structure of diamonds is built up successively by adding the largest possible diamond to the next open point within a triangular grid of side n. Each new diamond is added to the preceding structure of diamonds. At each step n, a new row of n open points is first added, extending the triangular grid.
Then the next open point is defined as the first open point encountered when the triangle is read by rows starting from the top row. a(n) is then the row position of the next open point.
Finally, starting at this open point the largest diamond that does not overlap any previous diamonds and fits within the triangular grid is added. Each diamond of side length k must cover exactly k^2 points, with the top corner on an open point. The points covered by the added diamond are then considered closed.
Is there a pattern for the values of n where a(n) = 1?

Examples

			Here zeros are the open points; closed points covered by the n-th diamond are replaced with n.
  ---------------------
  n=4       1          First a new row of 4 open points is added.
           2 3         Then the next open point is T(3,1) so a(4) = 1.
          4 0 0        Finally, the largest diamond fitting at T(3,1) is 1.
         0 0 0 0
  ---------------------
  n=5       1          First a new row of 5 open points is added.
           2 3         Then the next open point is T(3,2) so a(5) = 2.
          4 5 0        Finally, the largest diamond fitting at T(3,2) is 2.
         0 5 5 0
        0 0 5 0 0
  ---------------------
  n=6       1          First a new row of 6 open points is added.
           2 3         Then the next open point is T(3,3) so a(6) = 3.
          4 5 6        Finally, the largest diamond fitting at T(3,3) is 1.
         0 5 5 0
        0 0 5 0 0
       0 0 0 0 0 0
		

Crossrefs

Programs

  • Python
    # see linked program
Previous Showing 11-17 of 17 results.