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 41-44 of 44 results.

A262248 Number of intersections of diagonals in the interior of a regular p-gon where p is the n-th prime.

Original entry on oeis.org

0, 0, 5, 35, 330, 715, 2380, 3876, 8855, 23751, 31465, 66045, 101270, 123410, 178365, 292825, 455126, 521855, 766480, 971635, 1088430, 1502501, 1837620, 2441626, 3464840, 4082925, 4421275, 5160610, 5563251, 6438740, 10334625, 11716640, 14043870
Offset: 1

Views

Author

Altug Alkan, Sep 16 2015

Keywords

Comments

This is binomial(prime(n),4). - N. J. A. Sloane, May 17 2020
Subsequence of A006561.
a(n) = prime(n) only for n = 3.

Examples

			For prime(2)=3, there is no intersection of diagonals in the interior of a regular triangle, so a(2)=0.
		

Crossrefs

Programs

  • Magma
    [(NthPrime(n)^4-6*(NthPrime(n)^3)+11*NthPrime(n)^2- 6*NthPrime(n))/24: n in [1..40]]; // Vincenzo Librandi, Sep 17 2015
  • Mathematica
    Table[(Prime[n]^4 - 6 (Prime[n]^3) + 11 Prime[n]^2 - 6 Prime[n])/24, {n, 50}] (* Vincenzo Librandi, Sep 17 2015 *)
    (#^4-6#^3+11#^2-6#)/24&/@Prime[Range[40]] (* Harvey P. Dale, Jun 17 2022 *)
  • PARI
    a(n) = my(p=prime(n)); p*(p^3 - 6*p^2 + 11*p - 6)/24;
    vector(40, n, a(n))
    

Formula

a(n) = (prime(n)^4 - 6*prime(n)^3 + 11*prime(n)^2 - 6*prime(n))/24.
a(n) = A006561(A000040(n)).

A307681 Difference between the number of diagonals and the number of sides for a convex n-gon.

Original entry on oeis.org

-3, -2, 0, 3, 7, 12, 18, 25, 33, 42, 52, 63, 75, 88, 102, 117, 133, 150, 168, 187, 207, 228, 250, 273, 297, 322, 348, 375, 403, 432, 462, 493, 525, 558, 592, 627, 663, 700, 738, 777, 817, 858, 900, 943, 987, 1032, 1078, 1125, 1173, 1222, 1272, 1323, 1375, 1428, 1482, 1537, 1593, 1650, 1708, 1767, 1827, 1888, 1950, 2013, 2077, 2142, 2208, 2275
Offset: 3

Views

Author

Bernard Schott, Apr 21 2019

Keywords

Comments

The number of diagonals for a convex polygon with n sides is n*(n-3)/2.
For a triangle and a quadrilateral, the number of sides is greater than the number of diagonals. For a pentagon, the number of sides is equal to the number of diagonals. For an hexagon or a polygon with more than six sides, the number of diagonals is greater than the number of sides.

Crossrefs

Cf. A000096 (number of diagonals of an n-gon).
Cf. A006561 (number of intersections of diagonals in the interior of regular n-gon).
Cf. A007678 (number of regions in regular n-gon with all diagonals drawn).

Programs

  • Magma
    [n*(n-5)/2: n in [3..80]]; // G. C. Greubel, Jul 31 2022
    
  • Mathematica
    Table[(n(n-5))/2, {n,3,80}] (* Harvey P. Dale, Jan 23 2021 *)
  • Sage
    [n*(n-5)/2 for n in (3..80)] # G. C. Greubel, Jul 31 2022

Formula

a(n) = n*(n - 5)/2.
a(n) = binomial(n-2, 2) - 3. - Yuchun Ji, Aug 12 2021
From G. C. Greubel, Jul 31 2022: (Start)
G.f.: (-1)*x^3*(3 - 7*x + 3*x^2)/(1-x)^3.
E.g.f.: (x/2)*( (x-4)*exp(x) + 4 + 3*x ). (End)

A352434 The number of simple vertices on a diagonal of a regular 2n-gon when all its vertices are connected by lines and where the diagonal passes through the center of the 2n-gon.

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 6, 6, 8, 8, 10, 8, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 20, 24, 24, 26, 26, 28, 28, 30, 30, 32, 32, 34, 32, 36, 36, 38, 38, 40, 40, 42, 42, 44, 44, 46, 44, 48, 48, 50, 50, 52, 52, 54, 54, 56, 56, 58, 56, 60, 60, 62, 62, 64, 64, 66, 66, 68, 68, 70, 68, 72, 72, 74, 74, 76
Offset: 1

Views

Author

Scott R. Shannon, Mar 16 2022

Keywords

Comments

Excluding a(2), which has its simple vertex at the center of the 4-gon, the terms predominantly follow a pattern of pairs of two equal numbers and where the pair values increment by two. The second term of each pair corresponds to 2n-gons where n is a multiple of 2. These 2n-gons have two vertices that are on the same horizontal line as the central non-simple vertex thus the line joining them will not form a new simple vertex with the central vertical diagonal. Therefore in general a(2*k) = a(2*k-1), k>=1. However this rule is broken when n is a multiple of 12 - for these 2n-gons two of the horizontal lines connecting the left-side and right-side vertices also intersect two non-central diagonals and thus two simple vertices are removed. See the linked image of the 24-gon.

Examples

			a(2) = 1 as the 4-gon (square) has one simple vertex at its center when all its vertices are connected by lines.
a(3) = 2 as the 6-gon (hexagon) has two simple vertices along the central diagonal when its vertices are connected by lines. See the linked image.
a(7) = 6 as the 14-gon has six simple vertices along the central diagonal when its vertices are connected by lines. See the linked image.
		

Crossrefs

Cf. A351924 (all vertices on diagonal), A352144 (all simple vertices), A292104, A007569, A006561, A146212.

A230503 Irregular triangle read by rows: possible number of interior intersection points of the diagonals of an n-sided convex polygon.

Original entry on oeis.org

0, 1, 5, 13, 15, 29, 31, 33, 35, 49, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 70
Offset: 3

Views

Author

Vladimir Letsko, Oct 21 2013

Keywords

Comments

Beginning from number of sides equal to 12 the terms no longer increase between rows. For example, the number of inner diagonal intersection points for the regular 12-gon is fewer than the number of inner diagonal intersection points for regular 11-gon.
Obviously there exists a number k_0 such that k_0 is not in the sequence and k is in the sequence for all k > k_0.

Examples

			The beginning of the irregular triangle is:
3| 0
4| 1
5| 5
6| 13, 15
7| 29, 31, 33, 35
8| 49, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 70
		

Crossrefs

Previous Showing 41-44 of 44 results.