Please input the number of the Bernoulli number you want to compute

What are Bernoulli numbers? Well, they're a bunch of numbers that are coefficients for a few really famous functions. That just means that they are the numbers that you multiply by in some functions.

So how do you compute them? Well, it's actually a pretty complicated formula. its:

So how did we do this? We took it a little bit at a time. First, we computed the -1/p+1 part, then we computed the sum part, and so on. Then, we relayed it back to the original program and did a little bit of arithmetic to finish it off. The sum part was a little tricky, though. We had to compute each previous Bernoulli number, then we had to multiply it by the binomial coefficient where the bottom number matched the number of the Bernoulli number. Then, we added those together.