Back to Freecodecamp

Problem 432: Totient sum

curriculum/challenges/english/blocks/project-euler-problems-401-to-480/5900f51e1000cf542c510030.md

latest520 B
Original Source

--description--

Let $S(n, m) = \sum φ(n × i)$ for $1 ≤ i ≤ m$. ($φ$ is Euler's totient function)

You are given that $S(510\,510, {10}^6) = 45\,480\,596\,821\,125\,120$.

Find $S(510\,510, {10}^{11})$. Give the last 9 digits of your answer.

--hints--

totientSum() should return 754862080.

js
assert.strictEqual(totientSum(), 754862080);

--seed--

--seed-contents--

js
function totientSum() {

  return true;
}

totientSum();

--solutions--

js
// solution required