#Groovy, 26 bytes
This answer was basically stolen from @Geobits.
a={n->n--?a(n)*~-a(n)+1:2} Took that answer and, using groovy shortcuts, optimized it further.
#Groovy, 26 bytes
This answer was basically stolen from @Geobits.
a={n->n--?a(n)*~-a(n)+1:2} Took that answer and, using groovy shortcuts, optimized it further.