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>
1.2 KiB
1.2 KiB
id, challengeType, isHidden, title, forumTopicId
id | challengeType | isHidden | title | forumTopicId |
---|---|---|---|---|
5900f5311000cf542c510042 | 5 | false | Problem 451: Modular inverses | 302124 |
Description
Let I(n) be the largest positive number m smaller than n-1 such that the modular inverse of m modulo n equals m itself. So I(15)=11. Also I(100)=51 and I(7)=1.
Find ∑I(n) for 3≤n≤2·107
Instructions
Tests
tests:
- text: <code>euler451()</code> should return 153651073760956.
testString: assert.strictEqual(euler451(), 153651073760956);
Challenge Seed
function euler451() {
// Good luck!
return true;
}
euler451();
Solution
// solution required