47 lines
		
	
	
		
			903 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			903 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | |
| id: 5900f3d91000cf542c50feeb
 | |
| title: 'Problem 108: Diophantine Reciprocals I'
 | |
| challengeType: 5
 | |
| forumTopicId: 301732
 | |
| dashedName: problem-108-diophantine-reciprocals-i
 | |
| ---
 | |
| 
 | |
| # --description--
 | |
| 
 | |
| In the following equation x, y, and n are positive integers.
 | |
| 
 | |
| $$\frac{1}{x} + \frac{1}{y} = \frac{1}{n}$$
 | |
| 
 | |
| For `n` = 4 there are exactly three distinct solutions:
 | |
| 
 | |
| $$\begin{align} & \frac{1}{5} + \frac{1}{20} = \frac{1}{4}\\\\ \\\\ & \frac{1}{6} + \frac{1}{12} = \frac{1}{4}\\\\ \\\\ & \frac{1}{8} + \frac{1}{8} = \frac{1}{4} \end{align}$$
 | |
| 
 | |
| What is the least value of `n` for which the number of distinct solutions exceeds one-thousand?
 | |
| 
 | |
| # --hints--
 | |
| 
 | |
| `diophantineOne()` should return `180180`.
 | |
| 
 | |
| ```js
 | |
| assert.strictEqual(diophantineOne(), 180180);
 | |
| ```
 | |
| 
 | |
| # --seed--
 | |
| 
 | |
| ## --seed-contents--
 | |
| 
 | |
| ```js
 | |
| function diophantineOne() {
 | |
| 
 | |
|   return true;
 | |
| }
 | |
| 
 | |
| diophantineOne();
 | |
| ```
 | |
| 
 | |
| # --solutions--
 | |
| 
 | |
| ```js
 | |
| // solution required
 | |
| ```
 |