n
, and return an integer.
hofstadterQ
is a function.
testString: assert(typeof hofstadterQ === 'function');
- text: hofstadterQ()
should return integer
testString: assert(Number.isInteger(hofstadterQ(1000)));
- text: hofstadterQ(1000)
should return 502
testString: assert.equal(hofstadterQ(testCase[0]), res[0]);
- text: hofstadterQ(1500)
should return 755
testString: assert.equal(hofstadterQ(testCase[1]), res[1]);
- text: hofstadterQ(2000)
should return 1005
testString: assert.equal(hofstadterQ(testCase[2]), res[2]);
- text: hofstadterQ(2500)
should return 1261
testString: assert.equal(hofstadterQ(testCase[3]), res[3]);
```