# How to find (or 'generate') combinatorial meaning for the given expression

$\left(\dfrac{6(k-n)(k-1)}{(n-2)(n-1)}+1\right)\dfrac{30}{n(n+1)(n+2)}$ (for $n\geq 3$ and $1\leq k \leq n$)

The expression comes from question Please help to find function for given inputs and outputs where it is used to get answer for some unknown problem (I believe that's combinatorial, with possibility of used Monte-Carlo method). The OP didn't give any interpretation of the expression.

P.S. There's tiny possibility that it was mathematical/SE joke.

-
That's an expression, not a formula. – Michael Joyce Feb 16 '13 at 15:23
@MichaelJoyce Thank you. Fixed. – zaarcis Feb 16 '13 at 15:25
This is just my attempt to rewrite the formula in a more appealing and symmetric way (symmetric with respect to $k$ vs $n+1-k$): $$\frac{30\Big((n+1)(n+2)-6k(n+1-k)\Big)}{(n-2)(n-1)n(n+1)(n+2)}$$ For all I know, this formula could be an essential component of the North Korea nuclear program. This was discussed on meta – user53153 Feb 19 '13 at 18:02

I want a quadratic function with zero mean defined on $\{1,\dots,n\}$. Naturally, it should be symmetric about the midpoint of the interval. The obvious symmetric function is $k(k-n-1)$, but it does not have mean zero. The mean is $$\frac{1}{n}\sum_{k=1}^n k(k-n-1) = -\frac{(n+1)(n+2)}{6}$$ So I subtract that, arriving at $k(k-n-1)+\frac{(n+1)(n+2)}{6}$. But maybe I also care about the second moment, which is $$\sum_{k=1}^n \left(k(k-n-1)+\frac{(n+1)(n+2)}{6}\right)^2 = \frac{(n-2)(n-1)n(n+1)(n+2)}{180}$$ Dividing by the second moment yields $$\frac{180}{(n-2)(n-1)n(n+1)(n+2)}\left(k(k-n-1)+\frac{(n+1)(n+2)}{6}\right)$$ which is the formula in question.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.892969012260437, "perplexity": 423.6838945338533}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-18/segments/1461861812410.28/warc/CC-MAIN-20160428164332-00220-ip-10-239-7-51.ec2.internal.warc.gz"}