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

A211383 Number of intersections of diagonals in the interior and exterior of a regular n-gon.

Original entry on oeis.org

0, 1, 5, 13, 42, 73, 189, 271, 572, 661, 1365, 1569, 2790, 3057, 5117, 4555, 8664, 9041, 13797, 14213, 20930, 18625, 30525, 30967, 43092, 43513, 59189, 45871, 79422, 79713, 104445, 104619, 134960, 124921, 171717, 171533, 215514, 215081, 267197, 234319, 327660, 326569, 397845, 396337
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+j):
                        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 (l!=n+i) and (not y.is_zero()): S.add(x/y)
        return len(S)  # Robin Visser, Jul 29 2024

Formula

a(n) = (1/8)*n*(n-3)*(n^2-8*n+19) for n odd.
a(n) = A006561(n) + A211382(n).

Extensions

More terms from Robin Visser, Jul 29 2024
Showing 1-1 of 1 results.