n₀
, greater than zero.n
of the series by reversing n₀
and adding it to n₀
n
becomes palindromic - i.e. the digits of n
in reverse order == n
.isLychrel
should be a function.
testString: assert(typeof isLychrel === 'function');
- text: isLychrel(12)
should return a boolean.
testString: assert(typeof isLychrel(12) === 'boolean');
- text: isLychrel(12)
should return false
.
testString: assert.equal(isLychrel(12), false);
- text: isLychrel(55)
should return false
.
testString: assert.equal(isLychrel(55), false);
- text: isLychrel(196)
should return true
.
testString: assert.equal(isLychrel(196), true);
- text: isLychrel(879)
should return true
.
testString: assert.equal(isLychrel(879), true);
- text: isLychrel(44987)
should return false
.
testString: assert.equal(isLychrel(44987), false);
- text: isLychrel(7059)
should return true
.
testString: assert.equal(isLychrel(7059), true);
```