Post History
JavaScript, 37 32 bytes Outputs a comma delimited string. f=n=>n-1?n+[,f(n**(.5+n%2)|0)]:n Try it online!
Answer
#2: Post edited
# JavaScript, 37 bytes- Outputs a comma delimited string.
- <!-- language-all: lang-javascript -->
f=n=>n-1?n+[,f(n**[.5,1.5][n%2]|0)]:n[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1i5P19A@TztaJ00jT0srWs9Ux1DPNDY6T9UotsZAM9Yq739yfl5xfk6qXk5@ukaahrGm5n8A)
- # JavaScript, <s>37</s> 32 bytes
- Outputs a comma delimited string.
- <!-- language-all: lang-javascript -->
- f=n=>n-1?n+[,f(n**(.5+n%2)|0)]:n
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zTbP1i5P19A@TztaJ00jT0tLQ89UO0/VSLPGQDPWKu9/cn5ecX5Oql5OfrpGmoaxpuZ/AA)