Files
gikf 397a9f0c3e fix(curriculum): clean-up Project Euler 462-480 (#43069)
* fix: clean-up Project Euler 462-480

* fix: missing image extension

* fix: corrections from review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2021-07-30 08:32:21 -07:00

1.0 KiB

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f54b1000cf542c51005d Problem 479: Roots on the Rise 5 302156 problem-479-roots-on-the-rise

--description--

Let a_k, b_k, and c_k represent the three solutions (real or complex numbers) to the expression \frac{1}{x} = {\left(\frac{k}{x} \right)}^2 (k + x^2) - kx.

For instance, for k = 5, we see that \\{a_5, b_5, c_5\\} is approximately \\{5.727244, -0.363622 + 2.057397i, -0.363622 - 2.057397i\\}.

Let S(n) = \displaystyle\sum_{p = 1}^n \sum_{k = 1}^n {(a_k + b_k)}^p {(b_k + c_k)}^p {(c_k + a_k)}^p for all integers p, k such that 1 ≤ p, k ≤ n.

Interestingly, S(n) is always an integer. For example, S(4) = 51\\,160.

Find S({10}^6) \text{ modulo } 1\\,000\\,000\\,007.

--hints--

rootsOnTheRise() should return 191541795.

assert.strictEqual(rootsOnTheRise(), 191541795);

--seed--

--seed-contents--

function rootsOnTheRise() {

  return true;
}

rootsOnTheRise();

--solutions--

// solution required