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.

A211382 Number of intersections of diagonals in the exterior of a regular n-gon.

Original entry on oeis.org

0, 0, 0, 0, 7, 24, 63, 110, 242, 360, 650, 812, 1425, 1680, 2737, 2718, 4788, 5200, 7812, 8272, 12075, 11328, 17875, 18486, 25542, 26264, 35438, 29070, 47957, 48800, 63525, 64362, 82600, 77940, 105672, 106552, 133263, 134200, 165927, 149478, 204250, 205128, 248850, 249596, 300377
Offset: 3

Views

Author

Martin Renner, Feb 07 2013

Keywords

Crossrefs

Programs

  • Sage
    def a(n):
        K = CyclotomicField(n); z = K.gen(); S = set()
        for i in range(n):
            for j in range(i+2, n):
                for k in range(j+1, n):
                    for l in range(k+2, n+i):
                        x = (z^(i-j)-z^(j-i))*(z^l-z^k)-(z^(k-l)-z^(l-k))*(z^j-z^i)
                        y = (z^-j-z^-i)*(z^l-z^k)-(z^-l-z^-k)*(z^j-z^i)
                        if (not y.is_zero()): S.add(x/y)
        return len(S)  # Robin Visser, Jul 29 2024

Formula

a(n) = 1/24*n*(n-3)*(n-5)*(2*n-11) for n odd

Extensions

a(17)-a(29) from Martin Renner, Feb 24 2013
More terms from Robin Visser, Jul 29 2024