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.

A243212 Number of ways to place 3 points on a triangular grid of side n so that no three of them are vertices of an equilateral triangle with sides parallel to the grid.

Original entry on oeis.org

0, 15, 107, 428, 1282, 3198, 7022, 14020, 26000, 45445, 75665, 120960, 186802, 280028, 409052, 584088, 817392, 1123515, 1519575, 2025540, 2664530, 3463130, 4451722, 5664828, 7141472, 8925553, 11066237, 13618360, 16642850, 20207160, 24385720, 29260400, 34920992
Offset: 2

Views

Author

Heinrich Ludwig, Jun 09 2014

Keywords

Crossrefs

Programs

  • Magma
    I:=[0,15,107,428,1282,3198,7022,14020]; [n le 8 select I[n] else 6*Self(n-1)-14*Self(n-2)+14*Self(n-3)-14*Self(n-5)+14*Self(n-6)-6*Self(n-7)+Self(n-8): n in [1..40]]; // Vincenzo Librandi, Jun 23 2015
  • Mathematica
    Table[Binomial[n (n + 1)/2, 3] - Floor[(n - 1) (n + 1) (2 n - 1)/8], {n, 2, 40}] (* Vincenzo Librandi, Jun 23 2015 *)
  • PARI
    concat(0, Vec(-x^3*(2*x^3-4*x^2+17*x+15)/((x-1)^7*(x+1)) + O(x^100))) \\ Colin Barker, Jun 09 2014
    

Formula

a(n) = C(n*(n+1)/2, 3) - floor((n-1)*(n+1)*(2*n-1)/8).
a(n) = C(n*(n+1)/2, 3) - A002717(n-1).
a(n) = (-3+3*(-1)^n+20*n+8*n^2-23*n^3-3*n^4+3*n^5+n^6)/48. - Colin Barker, Jun 09 2014
G.f.: -x^3*(2*x^3-4*x^2+17*x+15) / ((x-1)^7*(x+1)). - Colin Barker, Jun 09 2014