# [Red], <s>55</s> 49 bytes func[n][x: 2 if n > 0[loop n[x: x * x - x + 1]]x] [Red]: http://www.red-lang.org [Try it online!](https://tio.run/##K0pN@R@UmhIdy5Vm9T@tNC85Oi82usJKwUghM00hT8FOwSA6Jz@/QCEPJFihoAXEukCsrWAYG1sR@7@gKDOvRCFNwYALxjKEs4zgLGM4y@Q/AA "Red – Try It Online") *-6 thanks to Galen Ivanov* This is the first real thing I wrote in Red. You have been warned.