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

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

Original entry on oeis.org

0, 1, 70, 1038, 7398, 35727, 130768, 400116, 1062016, 2531001, 5529310, 11272710, 21639022, 39559591, 69283632, 116910052, 190977408, 303286461, 469431366, 710400658, 1053055398, 1532253131, 2192246528, 3088876728, 4290532688, 5882825641, 7969711934, 10677299074, 14156978846, 18591603883, 24195121104
Offset: 1

Views

Author

Martin Renner, Apr 21 2011

Keywords

Comments

If four points are chosen at random from an n X n grid, the probability that they form a convex quadrilateral approaches 25/36 as n increases, by Sylvester's Four-Point Theorem (see the link). Thanks to Ed Pegg Jr for this comment. - N. J. A. Sloane, Jun 15 2020

Crossrefs

This is the main diagonal of A334711.

Extensions

a(6) - a(22) from Nathaniel Johnston, Apr 25 2011
Terms beyond a(22) from Tom Duff. - N. J. A. Sloane, Jun 23 2020

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

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

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