Post History
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
#1: Initial revision
# [Python 3], 64 bytes <!-- language-all: lang-python --> def f(n): z=[n] while n>1:n=int(n**((n+.5)%2));z+=n, return z [Try it online!][TIO-koueha6c] [Python 3]: https://docs.python.org/3/ [TIO-koueha6c]: https://tio.run/##FcxBCsIwEAXQfU7xN8JMW4qtuGmJFykuBBM7IL8lRMRcPtIDvLf/8rrxUuszREShTg7FL7w7fFd7B/A2TPTGLGwaEbb9VU@j6lxaz84hhfxJRKlxSzAYkR58BRk6jOdj29OBo5hq/QM "Python 3 – Try It Online"