Problems > Stacking Hexagons > Editorial

Stacking Hexagons — Solution & Editorial

Back to the Problem

Sum k(2k−1) using the square-sum and triangular formulas; the result is K(K+1)(4K−1)/6.

Complexity: O(1)