Created
July 18, 2016 15:08
-
-
Save scastiel/9564de4efc39e1b380dd99107cb3f938 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function A(n) { | |
if (n === 0) { | |
return [ 841, 1189 ]; | |
} else { | |
var dimAn1 = A(n - 1); | |
return [Math.floor(dimAn1[1] / 2), Math.floor(dimAn1[0])]; | |
} | |
} | |
window.A = A; | |
[0, 1, 2, 3, 4].forEach(n => console.log(`A${n}:`, A(n))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment