41 lines
		
	
	
		
			579 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
		
		
			
		
	
	
			41 lines
		
	
	
		
			579 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
|   | --- | ||
|  | id: 5900f46e1000cf542c50ff81 | ||
|  | title: 'Problem 258: A lagged Fibonacci sequence' | ||
|  | challengeType: 5 | ||
|  | forumTopicId: 301906 | ||
|  | dashedName: problem-258-a-lagged-fibonacci-sequence | ||
|  | --- | ||
|  | 
 | ||
|  | # --description--
 | ||
|  | 
 | ||
|  | A sequence is defined as: | ||
|  | 
 | ||
|  | gk = 1, for 0 ≤ k ≤ 1999 gk = gk-2000 + gk-1999, for k ≥ 2000. Find gk mod 20092010 for k = 1018. | ||
|  | 
 | ||
|  | # --hints--
 | ||
|  | 
 | ||
|  | `euler258()` should return 12747994. | ||
|  | 
 | ||
|  | ```js | ||
|  | assert.strictEqual(euler258(), 12747994); | ||
|  | ``` | ||
|  | 
 | ||
|  | # --seed--
 | ||
|  | 
 | ||
|  | ## --seed-contents--
 | ||
|  | 
 | ||
|  | ```js | ||
|  | function euler258() { | ||
|  | 
 | ||
|  |   return true; | ||
|  | } | ||
|  | 
 | ||
|  | euler258(); | ||
|  | ``` | ||
|  | 
 | ||
|  | # --solutions--
 | ||
|  | 
 | ||
|  | ```js | ||
|  | // solution required | ||
|  | ``` |