You are viewing a single comment's thread. Return to all comments →
javascript
function superDigit(n, k) { let digits = [...n] if (digits.length == 1) return digits[0] return superDigit((digits.map(Number).reduce((acc, cur) => acc + cur, 0) * k).toString(), 1) }
Seems like cookies are disabled on this browser, please enable them to open this website
Recursive Digit Sum
You are viewing a single comment's thread. Return to all comments →
javascript