Skip to main content
added 263 characters in body
Source Link
Leaky Nun
  • 50.6k
  • 6
  • 115
  • 291

Jelly, 7 bytes

×_’²_’ 2Ç¡ 

Try it online!Try it online!

Uses this relationship provided in the sequence instead: a(n+1) = a(n)^2 - a(n) + 1

Explanation

2Ç¡ Main chain, argument in input 2 Start with 2 ¡ Repeat as many times as the input: Ç the helper link. ²_’ Helper link, argument: z ² z² ’ z - 1 _ subtraction, yielding z² - (z-1) = z² - z + 1 

Jelly, 7 bytes

×_’ 2Ç¡ 

Try it online!

Uses this relationship provided in the sequence instead: a(n+1) = a(n)^2 - a(n) + 1

Jelly, 7 bytes

²_’ 2Ç¡ 

Try it online!

Uses this relationship provided in the sequence instead: a(n+1) = a(n)^2 - a(n) + 1

Explanation

2Ç¡ Main chain, argument in input 2 Start with 2 ¡ Repeat as many times as the input: Ç the helper link. ²_’ Helper link, argument: z ² z² ’ z - 1 _ subtraction, yielding z² - (z-1) = z² - z + 1 
Source Link
Leaky Nun
  • 50.6k
  • 6
  • 115
  • 291

Jelly, 7 bytes

×_’ 2Ç¡ 

Try it online!

Uses this relationship provided in the sequence instead: a(n+1) = a(n)^2 - a(n) + 1