fix parentheses

This commit is contained in:
filifa
2025-07-20 20:05:01 -04:00
parent dd24aac8bb
commit f8d7a1d825
4 changed files with 4 additions and 4 deletions

View File

@@ -44,7 +44,7 @@
"source": [
"Theoretically, we could create a generating function like we did in [problem 31](https://projecteuler.net/problem=76) or [problem 76](https://projecteuler.net/problem=76) to solve this, and could even use $\\mathbb{Z}_{1000000}$ as our base ring to handle the modulus automagically, but since the answer is pretty large, it would be impractical to construct the function with the required precision.\n",
"\n",
"Instead, if you'd like to implement the [partition function](https://en.wikipedia.org/wiki/Partition_function_(number_theory)) yourself, Euler's [pentagonal number theorem](https://en.wikipedia.org/wiki/Pentagonal_number_theorem) leads to a useful recurrence equation:\n",
"Instead, if you'd like to implement the [partition function](https://w.wiki/EoNj) yourself, Euler's [pentagonal number theorem](https://en.wikipedia.org/wiki/Pentagonal_number_theorem) leads to a useful recurrence equation:\n",
"$$p(n) = p(n - 1) + p(n - 2) - p(n - 5) - p(n - 7) + p(n - 12) + p(n - 15) - p(n - 22) - p(n - 26) + \\cdots$$\n",
"Here, the numbers are the [generalized pentagonal numbers](https://en.wikipedia.org/wiki/Pentagonal_number). As base cases, $p(0) = 1$ and $p(n) = 0$ for negative $n$, so the infinite series eventually converges.\n",
"\n",