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.

A014557 Multiplicity of K_3 in K_n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The multiplicity of triangles in K_n is defined to be the minimum number of monochromatic copies of K_3 that occur in any 2-coloring of the edges of K_n. - Allan Bickle, Mar 04 2023
Twice A008804 (up to offset).
From Alexander Adamchuk, Nov 29 2006: (Start)
n divides a(n) for n = {1,2,3,4,5,8,10,13,14,16,17,20,22,25,26,28,29,32,34,37,38,40,41,44,46,49,50,52,53,56,58,61,62,64,65,68,70,73,74,76,77,80,82,85,86,88,89,92,94,97,98,100,...}.
Prime p divides a(p) for p = {2,3,5,13,17,29,37,41,53,61,73,89,97,101,109,113,137,149,157,173,181,193,197,...} = (2,3) and all primes from A002144: Pythagorean primes: primes of form 4n+1.
(n+1) divides a(n) for n = {1,2,3,4,5,19,27,43,51,67,75,91,99,...}.
(p+1) divides a(p) for prime p = {2,3,5,19,43,67,139,163,211,283,307,331,379,499,523,547,571,619,643,691,739,787,811,859,883,907,...} = {2,5} and all primes from A141373: Primes of the form 3x^2+16y^2.
(n-1) divides a(n) for n = {2,3,4,5,21,29,45,53,69,77,93,101,...}.
(p-1) divides a(p) for prime p = {2,3,5,29,53,101,149,173,197,269,293,317,389,461,509,557,653,677,701,773,797,821,941,..} = {2,3} and all primes from A107003: Primes of the form 5x^2+2xy+5y^2, with x and y any integer.
(n-2) divides a(n) for n = {3,4,5,12,16,24,28,36,40,48,52,60,64,72,76,84,88,96,100,...} = {3,5} and 4*A032766: Numbers congruent to 0 or 1 mod 3.
(n+3) divides a(n) for n = {1,2,3,4,5,9,11,18,32,39}.
(n-3) divides a(n) for n = {4,5,7,9,23,31,47,55,71,79,95,103,119,127,143,151,167,175,...}.
(p+3) divides a(p) for prime p = {5,7,23,31,47,71,79,103,127,151,167,191,199,...} = {5} and all primes from A007522: Primes of form 8n+7.
(n-4) divides a(n) for n = {5,6,8,11,12,14,15,18,20,23,24,26,27,30,32,35,36,38,39,42,44,47,48,50,...}.
(p-4) divides a(p) for prime p = {5,11,23,47,59,71,83,107,131,167,179,191,...} = {5} and all primes from A068231: Primes congruent to 11 (mod 12).
(n+5) divides a(n) for n = {1,2,3,4,5,30,31,45,58,145}.
(n-5) divides a(n) for n = {6,7,9,10,20,25,33,49,57,73,81,97,105,...}.
(p-5) divides a(p) for prime p = {7,73,97,193,241,313,337,409,433,457,577,601,673,769,937,...} = {7} and all primes from A107008: Primes of the form x^2+24y^2. (End)

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.
		

Crossrefs

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