The partition function counts the number of distinct ways we can represent as the sum of positive integers. Currently, there is no known closed form for , so computing it for large arguments is done recursively using computers. However, it is computationally intensive and can cause your program to crash if implemented naively.
Implement a program to compute exactly and enter the value of .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Partial solution. See here for a broader discussion on this.
We use a result by Euler, namely the pentagonal theorem, to deduce that p ( k ) = p ( k − 1 ) + p ( k − 2 ) − p ( k − 5 ) − p ( k − 7 ) + p ( k − 1 2 ) + p ( k − 1 5 ) − p ( k − 2 2 ) − . . . where the numbers used are generalized Pentagonal Numbers.
partitions !! 8000
gives the desired result in about 30 seconds.