A262248 Number of intersections of diagonals in the interior of a regular p-gon where p is the n-th prime.
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
Examples
For prime(2)=3, there is no intersection of diagonals in the interior of a regular triangle, so a(2)=0.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
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))
Comments