freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-439-sum-of-sum-of-divisors.english.md
mrugesh 22afc2a0ca feat(learn): python certification projects (#38216)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
Co-authored-by: Beau Carnes <beaucarnes@gmail.com>
2020-05-27 13:19:08 +05:30

967 B

id, challengeType, isHidden, title, forumTopicId
id challengeType isHidden title forumTopicId
5900f5231000cf542c510035 5 false Problem 439: Sum of sum of divisors 302110

Description

Let d(k) be the sum of all divisors of k. We define the function S(N) = ∑1≤i≤N ∑1≤j≤Nd(i·j). For example, S(3) = d(1) + d(2) + d(3) + d(2) + d(4) + d(6) + d(3) + d(6) + d(9) = 59.

You are given that S(103) = 563576517282 and S(105) mod 109 = 215766508. Find S(1011) mod 109.

Instructions

Tests

tests:
  - text: <code>euler439()</code> should return 968697378.
    testString: assert.strictEqual(euler439(), 968697378);

Challenge Seed

function euler439() {
  // Good luck!
  return true;
}

euler439();

Solution

// solution required