OFFSET
1,5
COMMENTS
From Mikhail Lavrov, Apr 05 2021: (Start)
This is the bound derived from Turán's theorem; it is tight when n is divisible by k.
LINKS
Reinhard Zumkeller, Rows n = 1..100 of triangle, flattened
P. Erdős, R. J. Faudree, and C. C. Rousseau, Extremal problems involving vertices and edges on odd cycles, Disc. Math. 101 (1992) 23-31.
Brian M. Scott, Deriving the number of edges in a Turán graph, Math StackExchange, 2015.
Eric Weisstein's World of Mathematics, Turan Graph
Eric Weisstein's World of Mathematics, Turans Theorem
FORMULA
T(n,k) = floor((k-1)*n^2/(2*k)).
EXAMPLE
The triangle T(n,k) begins:
0;
0, 1;
0, 2, 3;
0, 4, 5, 6;
0, 6, 8, 9, 10;
0, 9, 12, 13, 14, 15;
...
MATHEMATICA
Flatten[Table[Floor[(k - 1) n^2/(2k)], {n, 20}, {k, n}]]
PROG
(Haskell)
a193331 n k = a193331_tabl !! (n-1) !! (k-1)
a193331_tabl = map a193331_row [1..]
a193331_row n = zipWith div (map (* n^2) [0..n-1]) (map (2 *) [1..n])
-- Reinhard Zumkeller, Aug 08 2011
(PARI) T(n, k)=(k-1)*n^2\(2*k) \\ Charles R Greathouse IV, Aug 01 2016
CROSSREFS
AUTHOR
Eric W. Weisstein, Jul 22 2011
EXTENSIONS
Name clarified by Mikhail Lavrov, Apr 05 2021
STATUS
approved