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.

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)).