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-9 of 9 results.

A175383 Number of complete quadrangles on an n X n grid (or geoplane).

Original entry on oeis.org

0, 1, 78, 1278, 9498, 47331, 175952, 545764, 1461672, 3507553, 7701638, 15773526, 30375194, 55695587, 97777392, 165310348, 270478344, 430196181, 666685134, 1010083690, 1498720098, 2182544223
Offset: 1

Views

Author

Martin Renner, Apr 19 2011

Keywords

Comments

A complete quadrangle is a set of four points, no three collinear, and the six lines which join them.
Number of ways to arrange 4 indistinguishable points on an n X n square grid so that no three points are collinear at any angle. Column 4 of A194193. - R. H. Hardin, Aug 18 2011

Examples

			From _R. H. Hardin_, Aug 18 2011: (Start)
Some solutions for 3 X 3:
  0 1 1   1 1 0   1 0 1   0 1 1   0 0 0   1 1 0   1 1 0
  1 0 0   0 0 0   1 0 0   1 1 0   1 1 0   0 0 1   1 0 0
  1 0 0   1 0 1   0 0 1   0 0 0   0 1 1   0 1 0   0 1 0
(End)
		

Formula

a(n) = A189345(n) - A189346(n) - A178256(n).
a(n) = (1/3)*A189412(n) + A189413(n).

Extensions

a(6)-a(22) from Nathaniel Johnston, Apr 25 2011
a(7)-a(22) corrected by Nathaniel Johnston, based on another correction by Michal Forišek, Sep 06 2011

A189412 Number of concave quadrilaterals on an n X n grid (or geoboard).

Original entry on oeis.org

0, 0, 24, 720, 6300, 34812, 135552, 436944, 1198968, 2929656, 6516984, 13502448, 26208516, 48407988, 85481280, 145200888, 238502808, 380729160, 591761304, 899049096, 1336994100, 1950873276, 2798226336, 3952174032, 5500597632, 7555866072, 10253438688
Offset: 1

Views

Author

Martin Renner, Apr 21 2011

Keywords

Crossrefs

Programs

  • Python
    def gcd(x, y):
      x, y = abs(x), abs(y)
      while y: x, y = y, x%y
      return x
    def concave(N):
      V = [ (r, c) for r in range(-N+1, N) for c in range(N) if (c>0 or r>0) ]
      answer = 0
      for i in range(len(V)):
        for j in range(i):
          r1, c1, r2, c2 = V[i]+V[j]
          rr, cr, ta = N-max(r1, r2, 0)+min(r1, r2, 0), N-max(c1, c2), abs(r1*c2-r2*c1)
          if rr>0 and cr>0 and ta>0:
            answer += 3*rr*cr*(ta+2-gcd(r1, c1)-gcd(r2, c2)-gcd(r1-r2, c1-c2))/2
      return answer
    for N in range(1, 28):
        print(int(concave(N)), end=', ')

Extensions

a(6)-a(22) from Nathaniel Johnston, Apr 25 2011
Terms a(7)-a(22) corrected by Michal Forisek, Sep 06 2011
Terms a(23)-a(50) added by Michal Forisek, Sep 06 2011

A334711 Array read by antidiagonals: T(n,k) (n>=1, k>=1) = number of ways to select four points from an n X k grid so that they form a convex quadrilateral.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 9, 9, 0, 0, 36, 70, 36, 0, 0, 100, 276, 276, 100, 0, 0, 225, 750, 1038, 750, 225, 0, 0, 441, 1677, 2788, 2788, 1677, 441, 0, 0, 784, 3260, 6190, 7398, 6190, 3260, 784, 0, 0, 1296, 5776, 11942, 16328, 16328, 11942, 5776, 1296, 0, 0, 2025, 9508, 21062, 31396, 35727, 31396, 21062, 9508, 2025, 0
Offset: 1

Views

Author

N. J. A. Sloane, Jun 15 2020

Keywords

Comments

Computed by Tom Duff, Jun 15 2020
For the limiting probability that the four points form a convex quadrilateral when n and k are large, see the link to Sylvester's Four-Point Problem. Thanks to Ed Pegg Jr for this comment.

Examples

			The initial rows of the array are:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
0, 1, 9, 36, 100, 225, 441, 784, 1296, 2025, 3025, 4356, ...
0, 9, 70, 276, 750, 1677, 3260, 5776, 9508, 14825, 22090, 31764, ...
0, 36, 276, 1038, 2788, 6190, 11942, 21062, 34586, 53748, 79930, 114760, ...
0, 100, 750, 2788, 7398, 16328, 31396, 55244, 90484, 140372, 208490, 299048, ...
0, 225, 1677, 6190, 16328, 35727, 68447, 120106, 196338, 304161, 451035, 646116, ...
0, 441, 3260, 11942, 31396, 68447, 130768, 229034, 373968, 578777, 857524, 1227572, ...
0, 784, 5776, 21062, 55244, 120106, 229034, 400116, 652318, 1008438, 1492870, 2135534, ...
0, 1296, 9508, 34586, 90484, 196338, 373968, 652318, 1062016, 1640284, 2426660, 3469356, ...
0, 2025, 14825, 53748, 140372, 304161, 578777, 1008438, 1640284, 2531001, 3742053, 5347100, ...
...
The initial antidiagonals are:
0,
0, 0,
0, 1, 0,
0, 9, 9, 0,
0, 36, 70, 36, 0,
0, 100, 276, 276, 100, 0,
0, 225, 750, 1038, 750, 225, 0,
0, 441, 1677, 2788, 2788, 1677, 441, 0,
0, 784, 3260, 6190, 7398, 6190, 3260, 784, 0,
0, 1296, 5776, 11942, 16328, 16328, 11942, 5776, 1296, 0,
0, 2025, 9508, 21062, 31396, 35727, 31396, 21062, 9508, 2025, 0,
0, 3025, 14825, 34586, 55244, 68447, 68447, 55244, 34586, 14825, 3025, 0,
...
		

Crossrefs

The main diagonal is A189413.
Triangles A334708, A334709, A334710, A334711 give the counts for the four possible arrangements of four points.
For three points there are just two possible arrangements: see A334704 and A334705.

A189414 Number of quadrilaterals on an n X n grid (or geoboard).

Original entry on oeis.org

0, 1, 94, 1758, 13698, 70539, 266320, 837060, 2260984, 5460657, 12046294, 24775158, 47847538, 87967579, 154764912, 262110940, 429480216, 684015621, 1061192670, 1609449754, 2390049498, 3483126407
Offset: 1

Views

Author

Martin Renner, Apr 21 2011

Keywords

Crossrefs

Formula

a(n) = A189412(n) + A189413(n).

Extensions

a(6) - a(22) from Nathaniel Johnston, Apr 25 2011
a(7) - a(22) corrected by Michal Forisek, Sep 06 2011

A189418 Number of rhombi on an n X n grid (or geoboard).

Original entry on oeis.org

0, 1, 6, 22, 66, 151, 312, 564, 984, 1601, 2478, 3622, 5242, 7271, 9856, 13124, 17296, 22229, 28286, 35306, 43850, 53891, 65520, 78624, 94272, 111977, 131990, 154514, 180290, 208611, 240840, 276032, 315720, 359497, 407470, 460078, 519018, 582447, 651232, 725820, 808416
Offset: 1

Views

Author

Martin Renner, Apr 21 2011

Keywords

Crossrefs

Extensions

a(6)-a(28) from Nathaniel Johnston, Apr 23 2011
Terms beyond a(28) by R. H. Hardin, May 04 2011

A181944 Number of convex quadrilaterals, distinct up to congruence, on an n X n grid (or geoboard).

Original entry on oeis.org

0, 1, 12, 89, 407, 1413, 3894, 9431, 20212, 39847, 73177, 127582, 211012, 337186, 519594, 777447, 1134269, 1620415, 2264873, 3114709, 4209184, 5609209, 7378581, 9594611, 12326333, 15688198, 19779188, 24721601, 30646522, 37727553, 46093734, 55983150, 67558997
Offset: 1

Views

Author

Martin Renner, Apr 03 2012

Keywords

Examples

			a(1) = 0 because the 1 X 1 grid has no quadrilaterals.
a(2) = 1 because the 2 X 2 grid has one quadrilateral.
a(3) = 9 because the 3 X 3 grid has 12 congruence classes of quadrilaterals, out of 70 quadrilaterals total:
+-------+-------+-------+-------+
| . . . | . o . | . . . | . o . |
| o o . | o . . | o . o | o . . |
| o o . | o o . | o . o | o . o |
+-------+-------+-------+-------+
| . . o | o . o | . o . | . o . |
| o . . | . . . | o o . | o . o |
| o . o | o . o | o . . | o . . |
+-------+-------+-------+-------+
| . o o | . . o | . o . | . . o |
| o . . | o . o | o . o | o . . |
| o . . | o . . | . o . | o o . |
+-------+-------+-------+-------+
		

Crossrefs

Cf. A189413.

Extensions

a(7)-a(33) from Lucas A. Brown, Feb 06 2024

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

A189417 Number of kites on an n X n grid (or geoboard).

Original entry on oeis.org

0, 1, 10, 58, 222, 631, 1584, 3340, 6504, 11697, 19978, 31922, 49822, 74167, 107672, 152484, 211944, 286725, 383578, 502262, 651526, 833979, 1056104, 1318104, 1637336, 2011577, 2452634, 2965902, 3568086, 4253755, 5055448, 5960480, 6999104, 8173985, 9503674, 10994202
Offset: 1

Views

Author

Martin Renner, Apr 21 2011

Keywords

Comments

Only convex kites are counted, not concave kites (sometimes called darts or arrowheads).

Crossrefs

Extensions

a(7)-a(29) from Nathaniel Johnston, Apr 27 2011
a(30)-a(36) from Lucas A. Brown, Feb 09 2024

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
Showing 1-9 of 9 results.