1.2 KiB
1.2 KiB
id | challengeType | title |
---|---|---|
5900f5311000cf542c510042 | 5 | Problem 451: Modular inverses |
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, '<code>euler451()</code> should return 153651073760956.');
Challenge Seed
function euler451() {
// Good luck!
return true;
}
euler451();
Solution
// solution required