2018-09-30 22:01:58 +00:00
---
id: 5900f42b1000cf542c50ff3d
title: 'Problem 190: Maximising a weighted product'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301828
2021-01-13 02:31:00 +00:00
dashedName: problem-190-maximising-a-weighted-product
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
Let $S_m = (x_1, x_2, \ldots, x_m)$ be the $m$-tuple of positive real numbers with $x_1 + x_2 + \cdots + x_m = m$ for which $P_m = x_1 \times {x_2}^2 \times \cdots \times {x_m}^m$ is maximised.
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
For example, it can be verified that $[P_{10}] = 4112$ ([ ] is the integer part function).
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
Find $\sum {[P_m]}$ for $2 ≤ m ≤ 15$.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
`maximisingWeightedProduct()` should return `371048281` .
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
2021-07-15 13:52:14 +00:00
assert.strictEqual(maximisingWeightedProduct(), 371048281);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
2021-07-15 13:52:14 +00:00
function maximisingWeightedProduct() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
2021-07-15 13:52:14 +00:00
maximisingWeightedProduct();
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```