1.1 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1.1 KiB
		
	
	
	
	
	
	
	
id, challengeType, title, forumTopicId
| id | challengeType | title | forumTopicId | 
|---|---|---|---|
| 5900f5311000cf542c510042 | 5 | 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