Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tmp = a^n
answer = tmp
for (i = 1; i <= n; i += 1) {
tmp = (tmp * (n-i+1) * x )/(a * i)
answer = answer + tmp
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment