2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
id: 5900f4d01000cf542c50ffe3
|
|
|
|
title: 'Problem 356: Largest roots of cubic polynomials'
|
2020-11-27 19:02:05 +01:00
|
|
|
challengeType: 5
|
2019-08-05 09:17:33 -07:00
|
|
|
forumTopicId: 302016
|
2021-01-13 03:31:00 +01:00
|
|
|
dashedName: problem-356-largest-roots-of-cubic-polynomials
|
2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --description--
|
|
|
|
|
2022-03-02 07:46:06 -06:00
|
|
|
Let $a_n$ be the largest real root of a polynomial $g(x) = x^3 - 2^n \times x^2 + n$.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-29 19:14:22 +02:00
|
|
|
For example, $a_2 = 3.86619826\ldots$
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-29 19:14:22 +02:00
|
|
|
Find the last eight digits of $\displaystyle\sum_{i = 1}^{30} \lfloor {a_i}^{987654321}\rfloor$.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-29 19:14:22 +02:00
|
|
|
**Note:** $\lfloor a\rfloor$ represents the floor function.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --hints--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-29 19:14:22 +02:00
|
|
|
`rootsOfCubicPolynomials()` should return `28010159`.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
```js
|
2021-07-29 19:14:22 +02:00
|
|
|
assert.strictEqual(rootsOfCubicPolynomials(), 28010159);
|
2018-09-30 23:01:58 +01:00
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --seed--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
## --seed-contents--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
```js
|
2021-07-29 19:14:22 +02:00
|
|
|
function rootsOfCubicPolynomials() {
|
2020-09-15 09:57:40 -07:00
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-07-29 19:14:22 +02:00
|
|
|
rootsOfCubicPolynomials();
|
2018-09-30 23:01:58 +01:00
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --solutions--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|