49 lines
		
	
	
		
			755 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
		
		
			
		
	
	
			49 lines
		
	
	
		
			755 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
|   | --- | ||
|  | id: 5900f4b21000cf542c50ffc5 | ||
|  | title: 'Problem 326: Modulo Summations' | ||
|  | challengeType: 5 | ||
|  | forumTopicId: 301983 | ||
|  | dashedName: problem-326-modulo-summations | ||
|  | --- | ||
|  | 
 | ||
|  | # --description--
 | ||
|  | 
 | ||
|  | Let an be a sequence recursively defined by: . | ||
|  | 
 | ||
|  | So the first 10 elements of an are: 1,1,0,3,0,3,5,4,1,9. | ||
|  | 
 | ||
|  | Let f(N,M) represent the number of pairs (p,q) such that: | ||
|  | 
 | ||
|  | It can be seen that f(10,10)=4 with the pairs (3,3), (5,5), (7,9) and (9,10). | ||
|  | 
 | ||
|  | You are also given that f(104,103)=97158. | ||
|  | 
 | ||
|  | Find f(1012,106). | ||
|  | 
 | ||
|  | # --hints--
 | ||
|  | 
 | ||
|  | `euler326()` should return 1966666166408794400. | ||
|  | 
 | ||
|  | ```js | ||
|  | assert.strictEqual(euler326(), 1966666166408794400); | ||
|  | ``` | ||
|  | 
 | ||
|  | # --seed--
 | ||
|  | 
 | ||
|  | ## --seed-contents--
 | ||
|  | 
 | ||
|  | ```js | ||
|  | function euler326() { | ||
|  | 
 | ||
|  |   return true; | ||
|  | } | ||
|  | 
 | ||
|  | euler326(); | ||
|  | ``` | ||
|  | 
 | ||
|  | # --solutions--
 | ||
|  | 
 | ||
|  | ```js | ||
|  | // solution required | ||
|  | ``` |