Skip to main content
1 of 3
nimi
  • 35.9k
  • 4
  • 34
  • 99

Haskell, 49 bytes

a n|n<4=1|m<-n-2=a(n-1)+sum[a k*a(m-k)|k<-[2..m]]

Try it online!

A direct implementation of the recursive formula.

nimi
  • 35.9k
  • 4
  • 34
  • 99