Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-479-roots-on-the-rise.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

865 B

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 ak, bk, and ck represent the three solutions (real or complex numbers) to the expression 1/x = (k/x)2(k+x2) - kx.

For instance, for k = 5, we see that {a5, b5, c5} is approximately {5.727244, -0.363622+2.057397i, -0.363622-2.057397i}.

Let S(n) = Σ (ak+bk)p(bk+ck)p(ck+ak)p for all integers p, k such that 1 ≤ p, k ≤ n.

Interestingly, S(n) is always an integer. For example, S(4) = 51160.

Find S(106) modulo 1 000 000 007.

--hints--

euler479() should return 191541795.

assert.strictEqual(euler479(), 191541795);

--seed--

--seed-contents--

function euler479() {

  return true;
}

euler479();

--solutions--

// solution required