Skip to main content
added 5 characters in body
Source Link
chunes
  • 27.8k
  • 3
  • 32
  • 55

Red, 55 49 49 45 4539 bytes

func[n][x: 2 if n[looploop n[x: x * x - x + 1]]x]1]x] 

Try it online!Try it online!

  • -6 thanks to Galen Ivanov
  • -4 thanks to Pedro Maimere
  • -6 thanks to 9214

This is the first real thing I wrote in Red. You have been warned.

Red, 55 49 45 bytes

func[n][x: 2 if n[loop n[x: x * x - x + 1]]x] 

Try it online!

  • -6 thanks to Galen Ivanov
  • -4 thanks to Pedro Maimere

This is the first real thing I wrote in Red. You have been warned.

Red, 55 49 45 39 bytes

func[n][x: 2 loop n[x: x * x - x + 1]x] 

Try it online!

  • -6 thanks to Galen Ivanov
  • -4 thanks to Pedro Maimere
  • -6 thanks to 9214

This is the first real thing I wrote in Red. You have been warned.

make shorter thanks to Pedo Maimere
Source Link
chunes
  • 27.8k
  • 3
  • 32
  • 55

Red, 55 4955 49 45 bytes

func[n][x: 2 if n > 0[loopn[loop n[x: x * x - x + 1]]x] 

Try it online!Try it online!

-6 thanks to Galen Ivanov

  • -6 thanks to Galen Ivanov
  • -4 thanks to Pedro Maimere

This is the first real thing I wrote in Red. You have been warned.

Red, 55 49 bytes

func[n][x: 2 if n > 0[loop n[x: x * x - x + 1]]x] 

Try it online!

-6 thanks to Galen Ivanov

This is the first real thing I wrote in Red. You have been warned.

Red, 55 49 45 bytes

func[n][x: 2 if n[loop n[x: x * x - x + 1]]x] 

Try it online!

  • -6 thanks to Galen Ivanov
  • -4 thanks to Pedro Maimere

This is the first real thing I wrote in Red. You have been warned.

deleted 6 characters in body
Source Link
chunes
  • 27.8k
  • 3
  • 32
  • 55

Red, 55 49 bytes

func[n][x: 2 eitherif n > 0[loop n[x: x * x - x + 1]][x]]1]]x] 

Try it online!

-6 thanks to Galen Ivanov

This is the first real thing I wrote in Red. You have been warned.

Red, 55 49 bytes

func[n][x: 2 either n > 0[loop n[x: x * x - x + 1]][x]] 

Try it online!

-6 thanks to Galen Ivanov

This is the first real thing I wrote in Red. You have been warned.

Red, 55 49 bytes

func[n][x: 2 if n > 0[loop n[x: x * x - x + 1]]x] 

Try it online!

-6 thanks to Galen Ivanov

This is the first real thing I wrote in Red. You have been warned.

improve thanks to Galen Ivanov
Source Link
chunes
  • 27.8k
  • 3
  • 32
  • 55
Loading
deleted 3 characters in body
Source Link
chunes
  • 27.8k
  • 3
  • 32
  • 55
Loading
Source Link
chunes
  • 27.8k
  • 3
  • 32
  • 55
Loading