Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com> Co-authored-by: Beau Carnes <beaucarnes@gmail.com>
		
			
				
	
	
	
		
			1.3 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1.3 KiB
		
	
	
	
	
	
	
	
id, challengeType, isHidden, title, forumTopicId
| id | challengeType | isHidden | title | forumTopicId | 
|---|---|---|---|---|
| 5900f4951000cf542c50ffa8 | 5 | false | Problem 297: Zeckendorf Representation | 301949 | 
Description
Every positive integer can be uniquely written as a sum of nonconsecutive terms of the Fibonacci sequence. For example, 100 = 3 + 8 + 89. Such a sum is called the Zeckendorf representation of the number.
For any integer n>0, let z(n) be the number of terms in the Zeckendorf representation of n. Thus, z(5) = 1, z(14) = 2, z(100) = 3 etc. Also, for 0<n<106, ∑ z(n) = 7894453.
Find ∑ z(n) for 0<n<1017.
Instructions
Tests
tests:
  - text: <code>euler297()</code> should return 2252639041804718000.
    testString: assert.strictEqual(euler297(), 2252639041804718000);
Challenge Seed
function euler297() {
  // Good luck!
  return true;
}
euler297();
Solution
// solution required