A014557 Multiplicity of K_3 in K_n.
0, 0, 0, 0, 0, 0, 2, 4, 8, 12, 20, 28, 40, 52, 70, 88, 112, 136, 168, 200, 240, 280, 330, 380, 440, 500, 572, 644, 728, 812, 910, 1008, 1120, 1232, 1360, 1488, 1632, 1776, 1938, 2100, 2280, 2460, 2660, 2860, 3080, 3300, 3542, 3784, 4048, 4312, 4600, 4888, 5200
Offset: 0
Examples
Any 2-coloring of the edges of K_6 produces at least two monochromatic triangles. Having colors induce K_3,3 and 2K_3 shows this is attained, so a(6) = 2.
Links
- Alexander Adamchuk, Table of n, a(n) for n = 0..100
- R. Ehrenborg, Bounding monochromatic triangles using squares, Math. Magazine, 94 (2021), 383-386.
- A. W. Goodman, On Sets of Acquaintances and Strangers at Any Party, Amer. Math. Monthly 66, 778-783, 1959.
- L. Sauvé, On chromatic graphs, Amer. Math. Monthly, 68 (1961), 107-111.
- A. J. Schwenk, Acquaintance Party Problem, Amer. Math. Monthly 79 (1972), 1113-1117.
- V. Vijayalakshmi, Multiplicity of triangles in cocktail party graphs, Discrete Math., 206 (1999), 217-218.
- Eric Weisstein's World of Mathematics, Extremal Graph.
- Eric Weisstein's World of Mathematics, Monochromatic Forced Triangle.
- Index entries for linear recurrences with constant coefficients, signature (2,0,-2,2,-2,0,2,-1).
Programs
-
Magma
[n*(n-1)*(n-2)/6 - Floor((n/2)*Floor(((n-1)/2)^2)): n in [1..20]]; // G. C. Greubel, Oct 06 2017
-
Maple
A049322 := proc(n) local u; if n mod 2 = 0 then u := n/2; RETURN(u*(u-1)*(u-2)/3); elif n mod 4 = 1 then u := (n-1)/4; RETURN(u*(u-1)*(4*u+1)*2/3); else u := (n-3)/4; RETURN(u*(u+1)*(4*u-1)*2/3); fi; end;
-
Mathematica
Table[Binomial[n,3] - Floor[n/2*Floor[((n-1)/2)^2]],{n,0,100}] (* Alexander Adamchuk, Nov 29 2006 *)
-
PARI
x='x+O('x^99); concat(vector(6), Vec(2*x^6/((x-1)^4*(x+1)^2*(x^2+1)))) \\ Altug Alkan, Apr 08 2016
Formula
a(n) = binomial(n,3) - floor(n/2 * floor(((n-1)/2)^2)). - Alexander Adamchuk, Nov 29 2006
G.f.: 2*x^6/((x-1)^4*(x+1)^2*(x^2+1)). - Colin Barker, Nov 28 2012
E.g.f.: ((x - 3)*x^2*cosh(x) - 6*sin(x) + (6 + 3*x - 3*x^2 + x^3)*sinh(x))/24. - Stefano Spezia, May 15 2023
Extensions
Entry revised by N. J. A. Sloane, Mar 22 2004
Comments