<jupyter_start><jupyter_text>The problem can be formulated as$$\max \prod_{i=1}^{m}x_{i}^{i}$$$$\text{subject to} \sum x_{i}=m$$.Or equivalently,$$\max \prod_{i=1}^{m}i\log x_{i}$$$$\text{subject to} \sum x_{i}=m$$.By applying Lagrange multiplier, we have$$x_i = \frac{i}{\lambda}, \sum x_i = m$$.And thus,$$x_i = \frac{2i}{m+1}$$.Hence, $P_m = \frac{2^m\prod_{i=1}^{m} i^i}{(m+1)^m}$.<jupyter_code>def x(i):
    return 2*i/(m+1)

final_res = 0
for m in range(2,16):
    res = 1
    for i in range(1, m+1):
        res *= x(i)**i
    final_res += int(res)
    
final_res<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.24666666666666667, 'fraction_numerical': 0.02666666666666667, 'mean_word_length': 4.463636363636364, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '571291', 'license': 'MIT', 'n_tokens_mistral': 277, 'n_tokens_neox': 266, 'n_words': 51, 'path': 'Solvers/p190.ipynb', 'repo_name': 'waitaminutewhoareyou/Project-Euler', 'size': '600'}