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

@@ -11,7 +11,7 @@
"\n",
"The concept the problem is describing is called a [Farey sequence](https://en.wikipedia.org/wiki/Farey_sequence). The example given in the problem is $F_8$, and we are tasked with finding the numerator of the left neighbor of $\\frac{3}{7}$ in $F_{1000000}$.\n",
"\n",
"It turns out there is a very simple method for determining this. Whenever you have two neighbors $\\frac{a}{b}$ and $\\frac{c}{d}$ in a Farey sequence, the next term that will appear between them in a subsequent Farey sequence is simply $\\frac{a+c}{b+d}$, called the [mediant](https://en.wikipedia.org/wiki/Mediant_(mathematics)) of the two neighbors. For example, since we're given that the left neighbor of $\\frac{3}{7}$ in $F_8$ is $\\frac{2}{5}$, the next fraction to appear between the two will be\n",
"It turns out there is a very simple method for determining this. Whenever you have two neighbors $\\frac{a}{b}$ and $\\frac{c}{d}$ in a Farey sequence, the next term that will appear between them in a subsequent Farey sequence is simply $\\frac{a+c}{b+d}$, called the [mediant](https://w.wiki/EoNc) of the two neighbors. For example, since we're given that the left neighbor of $\\frac{3}{7}$ in $F_8$ is $\\frac{2}{5}$, the next fraction to appear between the two will be\n",
"$$\\frac{2+3}{5+7} = \\frac{5}{12}$$\n",
"Naturally, this fraction will first appear in $F_{12}$, meaning $\\frac{5}{12}$ is the left neighbor of $\\frac{3}{7}$ in that Farey sequence. We could then, in turn, find the mediant of $\\frac{5}{12}$ and $\\frac{3}{7}$ to find the next left neighbor of $\\frac{3}{7}$ ($\\frac{8}{19}$, appearing in $F_{19}$).\n",
"\n",