Posts by SherlockSage
APL (Dyalog Unicode), 15 bytesSBCS With many thanks to Marshall Lochbaum and dzaima for their help debugging and golfing this answer {⍵∪⌊⍵*2|⍵+.5}⍣≡ {⍵∪⌊⍵*2|⍵+.5}⍣≡ ⍝ ⍵ is our input of eith...
Answer
Python 3, 64 bytes def f(n): z=[n] while n>1:n=int(n**((n+.5)%2));z+=n, return z Try it online!
Answer