#JavaScript, <s>93</s> 85 bytes A (rather rushed) port of [Nick's Python solution](https://codegolf.stackexchange.com/a/188283/58974). n=>(g=x=>n--?g(x<y+~z/2n*6n+z%2n>>1n?++x:z<y/6n-~y/6n?++z-z:z=++y-y):[x,y,z])(y=z=0n) [Try It Online!](https://tio.run/##FY1BCoMwEAC/IoFC0jU1evCgbnyIeBCr0iIb0VKSPfj11F7mMDDMe/gOx7i/to8m95zijJHQygU9WtK6XaRvApycFXQvCfhWkLU5tQC@4iZkJenzz0uw5ooRIOigqs6nIeVeyYCMhlSc3S49mto3uTGmvno1OjrcOj1Wd11AJJh0AmbpFYheqPgD) Saved 8 bytes thank to [Arnauld](https://codegolf.stackexchange.com/users/58563/arnauld)'s suggestion of using BigInts, plus a couple of other tweaks.