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.

A111384 a(n) = binomial(n,3) - binomial(floor(n/2),3) - binomial(ceiling(n/2),3).

Original entry on oeis.org

0, 0, 0, 1, 4, 9, 18, 30, 48, 70, 100, 135, 180, 231, 294, 364, 448, 540, 648, 765, 900, 1045, 1210, 1386, 1584, 1794, 2028, 2275, 2548, 2835, 3150, 3480, 3840, 4216, 4624, 5049, 5508, 5985, 6498, 7030, 7600, 8190, 8820, 9471, 10164, 10879, 11638, 12420, 13248
Offset: 0

Views

Author

N. J. A. Sloane, Nov 10 2005

Keywords

Comments

a(n) is the maximum number of open triangles in a simple, undirected graph with n vertices. - Eugene Lykhovyd, Oct 20 2018
a(n) is the maximum number of elements of the set T := {3} u (IN \ 3IN) that can be written as a sum of three distinct elements of an n-element subset of T, see arXiv link 2309.14840. - Markus Sigg, Sep 27 2023
a(n) is the maximum number of triples (i.e., 3-element subsets of {1..n}) such that there exists a 2-coloring of {1..n} in which no triple is monochromatic. For the contrasting minimum number of triples such that every 2-coloring of {1..n} results in at least one monochromatic triple, see A385403. - David Dewan, Jul 04 2025

Crossrefs

Programs

  • GAP
    a:=[0,0,0,1,4,9];; for n in [7..50] do a[n]:=2*a[n-1]+a[n-2]-4*a[n-3]+a[n-4]+2*a[n-5]-a[n-6]; od; a; # Muniru A Asiru, Oct 21 2018
  • Magma
    [Binomial(n, 3) - Binomial(Floor(n/2), 3) - Binomial(Ceiling(n/2), 3): n in [0..50]]; // Vincenzo Librandi, Oct 20 2018
    
  • Maple
    seq(floor(n/2)*ceil(n/2)*(n-2)/2,n=0..50); # James R. Buddenhagen, Nov 11 2009
  • Mathematica
    LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 0, 0, 1, 4, 9}, 50] (* Vincenzo Librandi, Oct 20 2018 *)
  • PARI
    a(n)=floor(n/2)*ceil(n/2)*(n-2)/2 \\ Charles R Greathouse IV, Oct 16 2015
    

Formula

a(n) = floor(n/2)*ceiling(n/2)*(n-2)/2. - James R. Buddenhagen, Nov 11 2009
From R. J. Mathar, Mar 18 2010: (Start)
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6).
G.f.: x^3*(1+2*x)/ ((1+x)^2 * (x-1)^4). (End)
a(n) = A006918(n-2) + 2*A006918(n-3). - R. J. Mathar, Jan 20 2018
a(n) = (n-2)*n^2/8 for even n, a(n) = (n-2)*(n^2-1)/8 for odd n. - Markus Sigg, Sep 26 2023
Sum_{n>=3} 1/a(n) = 4/3 - Pi^2/6 + 8*log(2)/3. - Amiram Eldar, Oct 10 2023
E.g.f.: (x + 2)*(x*(x - 1)*cosh(x) + (x^2 - x + 1)*sinh(x))/8. - Stefano Spezia, Apr 08 2024