nyuuzyou/wikis huggingface dataset:
Fermat's Little Theorem/Historical Note

== Historical Note on Fermat's Little Theorem ==
Fermat's Little Theorem was first stated, without proof, by in $1640$.
Chinese mathematicians were aware of the result for $n = 2$ some $2500$ years ago.
The appearance of the first published proof of this result is the subject of differing opinions.
:Some sources have it that the first published proof was by $1736$.
:Others state that it was first proved by in an undated manuscript, and that he may have known a proof before $1688$, perhaps as early as $1683$.
:MathWorld's page on the subject reports the first published proof as being by $1749$, but it is possible this has been conflated with the proof for Fermat's Two Squares Theorem.
== Sources ==
* : Chapter $\text{IV}$: The Prince of Amateurs
* : $\S 3$: Appendix $\text A$: Euler
* : Chapter $\text {A}.13$: Fermat ()
* 
* 
Category:Historical Notes
Fermat's Little Theorem/Proof 1

== Theorem ==
== Proof ==
Consider the integer sequence $n, 2 n, 3 n, \dotsc, \paren {p - 1} n$.
Note that none of these integers is congruent modulo $p$ to any of the others.
If this were the case, we would have $a n \equiv b n \pmod p$ for some $1 \le a < b \le p - 1$.
Then as $\map \gcd {n, p} = 1$, and we can cancel the $n$, we get $a \equiv b \pmod p$ and so $a = b$.
We have that:
:$\forall c \in \set {1, 2, \dotsc, p - 1}: p \nmid n \land p \nmid c$
So by Euclid's Lemma:
:$p \nmid c n$
for any such $c n$, which means:
:$c n \not \equiv 0 \pmod p$
Thus, each integer in the sequence can be reduced modulo $p$ to exactly one of $1, 2, 3, \ldots, p - 1$.
So $\set {1, 2, 3, \ldots, p - 1}$ is the set of Reduced Residue System modulo $p$.
So, upon taking the product of these congruences, we see that:
:$n \times 2 n \times 3 n \times \dots \times \paren {p - 1} n \equiv 1 \times 2 \times 3 \times \cdots \times \paren {p - 1} \pmod p$
This simplifies to:
:$n^{p - 1} \times \paren {p - 1}! \equiv \paren {p - 1}! \pmod p$
Since $p \nmid \paren {p - 1}!$, we can cancel $\paren {p - 1}!$ from both sides, leaving us with:
:$n^{p - 1} \equiv 1 \pmod p$
== Sources ==
* : $\S 1.2.4$: Integer Functions and Elementary Number Theory: Theorem $\text{F}$
Category:Fermat's Little Theorem
Fermat's Little Theorem/Proof 2

== Theorem ==
== Proof ==
By Prime not Divisor implies Coprime:
:$p \nmid n \implies p \perp n$
and Euler's Theorem (Number Theory) can be applied.
Thus:
:$n^{\map \phi p} \equiv 1 \pmod p$
But from Euler Phi Function of Prime Power:
:$\map \phi p = p \paren {1 - \dfrac 1 p} = p - 1$
and the result follows.
== Sources ==
* : Chapter $2$: Subgroups and Cosets: $\S 42$
Category:Fermat's Little Theorem
Fermat's Little Theorem/Proof 3

== Theorem ==
== Proof ==
Let $\struct {\Z'_p, \times}$ denote the multiplicative group of reduced residues modulo $p$.
From the corollary to Reduced Residue System under Multiplication forms Abelian Group, $\struct {\Z'_p, \times}$ forms a group of order $p - 1$ under modulo multiplication.
By Element to Power of Group Order is Identity, we have:
: $n^{p - 1} \equiv 1 \pmod p$
== Sources ==
* : Chapter $7$: Cosets and Lagrange's Theorem: Exercise $16 \ \text{(ii)}$
Category:Fermat's Little Theorem
Fermat's Little Theorem/Proof 4

== Theorem ==
== Proof ==
Proof by induction over $n$.
Induction base:
:$1^p \equiv 1 \pmod p$
Induction step:
Assume $n^p \equiv n \pmod p$
and so:
Dividing by $n$:
:$\forall n: n^p \equiv n \pmod p \implies n^{p - 1} \equiv 1 \pmod p$
Category:Fermat's Little Theorem
Category:Proofs by Induction
Fermat's Little Theorem/Proof 5

== Theorem ==
== Proof ==
Let $S$ be a set of n elements, and consider $p$-tuples $\left( a_1, a_2, \dots, a_p \right)$ and consider the Group Action of these p-tuples by $\Z/p\Z$ via cyclic shifts.
For example, if:
:$S = \{ b, r, g \}$
and:
:$p=5$
then $rgbgg$ is equivalent to:
:$grgbg, ggrgb, bggrg, gbggr$.
We use Burnside's Lemma, counting the number of elements fixed by each element of the group $\Z/p\Z$. Note that the identity fixes all $a^p$ elements, and the only tuples fixed by any of the other $p-1$ elements of $\Z/p\Z$ are the $a$ tuples that are made up of only one element of $S$, for example $rrrrr$, $ggggg$, and $bbbbb$. 
Burnside's Lemma says that:
:$p \mid \left( n^p + (p-1) n \right)$
equivalently:
:$n^p \equiv n \pmod p$
== Sources ==
Category:Fermat's Little Theorem
Fermat's Marginal Notes

== 's Notes in the Margin of 's ==
Many of 's theorems were stated, mostly without proof, in the margin of his copy of 's translation of 's .
In $1670$, his son published an edition of this, complete with 's marginal notes.
The purpose of this page is to gather these notes together.
=== Fermat's Last Theorem ===
=== Integer as Sum of Polygonal Numbers ===
== Sources ==
* : Chapter $\text{IV}$: The Prince of Amateurs
* : Chapter $\text {A}.13$: Fermat ()
Category:Historical Notes
Category:Named Theorems/Fermat
Fermat's Principle of Least Time

== Physical Law ==
=== Original formulation ===
The path taken by a ray of light from one point to another is the one that can be traversed in the least time.
=== Modern version ===
The optical path length must be stationary, that is, be either a minimum, maximum or a point of inflection.
== Proof ==
This follows from the Huygens-Fresnel Principle.
== Also see ==
* Snell-Descartes Law
== Historical Note ==
== Sources ==
* : Chapter $\text{IV}$: The Prince of Amateurs
* : $1$: The Nature of Differential Equations: $\S 6$: The Brachistochrone. Fermat and the Bernoullis
* : Chapter $\text {A}.7$: Heron (first century A.D.)
* : Chapter $\text {A}.13$: Fermat ()
Category:Optics
Fermat's Principle of Least Time/Historical Note

== Historical Note on Fermat's Principle of Least Time ==
While Fermat's Principle of Least Time is named for , it has been understood from antiquity.
Its first appearance seems to have been when it was applied by when he formulated his Principle of Reflection.
== Sources ==
* : Chapter $\text{IV}$: The Prince of Amateurs
* : Chapter $\text {A}.7$: Heron (first century A.D.)
Category:Historical Notes
Fermat's Right Triangle Theorem

== Theorem ==
$x^4 + y^4 = z^2$ has no solutions in the (strictly) positive integers.
== Proof ==
This proof using Method of Infinite Descent was created by .
Suppose there is such a solution.
Then there is one with $\gcd \set {x, y, z} = 1$.
By Parity of Smaller Elements of Primitive Pythagorean Triple we can assume that $x^2$ is even and $y^2$ is odd.
By Primitive Solutions of Pythagorean Equation, we can write:
:$x^2 = 2 m n$
:$y^2 = m^2 - n^2$
:$z = m^2 + n^2$
where $m, n$ are coprime positive integers.
Similarly we can write:
:$n = 2 r s$
:$y = r^2 - s^2$
:$m = r^2 + s^2$
where $r, s$ are coprime positive integers, since $y$ is odd, forcing $n$ to be even.
We have:
:$\paren {\dfrac x 2}^2 = m \paren {\dfrac n 2}$
Since $m$ and $\dfrac n 2$ are coprime, they are both squares.
Similarly we have:
:$\dfrac n 2 = r s$
Since $r$ and $s$ are coprime, they are both squares.
Therefore $m = r^2 + s^2$ becomes an equation of the form $u^4 + v^4 = w^2$.
Moreover:
:$z^2 > m^4 > m$
and so we have found a smaller set of solutions.
By Method of Infinite Descent, no solutions can exist.
Category:Number Theory
Fermat's Two Squares Theorem/Also known as

== Fermat's Two Squares Theorem: Also known as ==
Fermat's Two Squares Theorem is also known as just the Two Squares Theorem.
It is also known as Fermat's Christmas Theorem on account of the date on it.
== Sources ==
* : Chapter $\text {B}.2$: More about Numbers: Irrationals, Perfect Numbers and Mersenne Primes
Category:Fermat's Two Squares Theorem
Fermat's Two Squares Theorem/Historical Note

== Historical Note on Fermat's Two Squares Theorem ==
According to , on "Albert Girard" at Absolute Astronomy.com, Fermat's Two Squares Theorem was initially stated without proof by in $1632$.
 announced its proof in a letter to dated December $25$, $1640$.
For this reason it is also sometimes referred to as Fermat's Christmas Theorem.
The first published proof was by after $7$ years of hard work.
== Sources ==
* : Chapter $\text{IV}$: The Prince of Amateurs
* : $\S 3$: Appendix $\text A$: Euler
* : $13$
* : Chapter $\text {A}.13$: Fermat (): Footnote $11$
* : $13$
Category:Historical Notes
Fermat's Two Squares Theorem/Uniqueness Lemma

== Lemma for Fermat's Two Squares Theorem ==
Let $p$ be a prime number.
Suppose there were an expression:
:$p = a^2 + b^2$
where $a$ and $b$ are positive integers.
Then that expression would be unique except for the order of the two summands.
== Proof 1 ==
== Proof 2 ==
== Proof 3 ==
Category:Fermat's Two Squares Theorem
Fermat's Two Squares Theorem/Uniqueness Lemma/Proof 1

== Lemma for Fermat's Two Squares Theorem ==
== Proof ==
Suppose:
:$p = a^2 + b^2 = c^2 + d^2$
where $a, b, c, d \in \Z_{>0}$.
We have that:
$p$ is prime .
From Euclid's Lemma for Prime Divisors:
:$p \divides \paren {a c + b d}$
or:
:$p \divides \paren {a d + b c}$
, suppose $p \divides \paren {a c + b d}$.
By :
:$(1): \quad a c + b d \ge p$ 
We have:
Hence:
:$c = a$
and:
:$b = d$
Category:Fermat's Two Squares Theorem
Fermat's Two Squares Theorem/Uniqueness Lemma/Proof 2

== Lemma for Fermat's Two Squares Theorem ==
== Proof ==
Suppose:
:$p = a^2 + b^2 = c^2 + d^2$
where $a > b > 0$ and $c > d > 0$.
We are going to show that $a = c$ and $b = d$.
From the two expressions for $p$, we have:
So we have:
:$\paren {a d - b c} \paren {a d + b c} \equiv 0 \pmod p$
From Euclid's Lemma, that means:
:$p \divides \paren {a d - b c}$
or:
:$p \divides \paren {a d + b c}$
 $p \divides \paren {a d + b c}$.
Now, we have that each of $a^2, b^2, c^2, d^2$ must be less than $p$.
Hence $0 < a, b, c, d < \sqrt p$.
This implies $0 < a d + b c < 2 p$.
That must mean that $a d + b c = p$.
But then:
That means:
:$a c - b d = 0$
But since $a > b$ and $c > d$ we have:
:$a c > b d$
This contradiction shows that $a d + b c$ can not be divisible by $p$.
So this means:
:$p \divides \paren {a d - b c}$
Similarly, because $0 < a, b, c, d < \sqrt p$ we have:
:$-p < a d - b c < p$
This means:
:$a d = b c$
So:
:$a \divides b c$
But $a \perp b$ otherwise $a^2 + b^2$ has a common divisor greater than $1$ and less than $p$.
This cannot happen because $p$ is prime.
So by Euclid's Lemma:
:$a \divides c$
So we can put $c = k a$ and so $a d = b c$ becomes $d = k b$.
Hence:
:$p = c^2 + d^2 = k^2 \paren {a^2 + b^2} = k^2 p$
This means $k = 1$ which means $a = c$ and $b = d$ as we wanted to show.
Category:Fermat's Two Squares Theorem
Fermat's Two Squares Theorem/Uniqueness Lemma/Proof 3

== Lemma for Fermat's Two Squares Theorem ==
== Proof ==
For $p = 2$ the only possibility is:
:$p = 1^2 + 1^2$
Assume $p \ge 3$.
Let $a \ge b$ and $c \ge d$ satisfy:
:$p = a^2 + b^2 = c^2 + d^2$
As $2 \nmid p$, we have:
:$(1): \quad a > b$ and $c > d$
Observe:
On the other hand:
Hence:
:$p \divides a c + b d$
In particular:
:$p \le a c + b d$
Thus:
Inserting this back into $(2)$, we obtain:
:$p^2 = \paren {a c + b d}^2$
That is:
:$p = a c + b d$
Hence:
Thus $a = c$ and $b = d$.
Category:Fermat's Two Squares Theorem
Fermat Number is not Cube/Proof 2

== Theorem ==
== Proof ==
Let $1 + 2^n$ be a Fermat number.
Suppose $a^3 = 1 + 2^n$.
Since $1 + 2^n$ is odd, $a$ must also be odd.
Write $a = 2 m + 1$, where $m > 0$.
Then:
Since $4 m^2 + 6 m + 3$ is odd and greater than $1$, it is not a power of $2$.
Hence the equation $a^3 = 1 + 2^n$ has no solution in the integers.
Thus there are no Fermat numbers which are cubes.
Category:Fermat Number is not Cube
Fermat Number is not Perfect Power

== Theorem ==
There exist no Fermat numbers which are perfect powers.
== Proof ==
Each Fermat number is in the form of $1 + 2^n$ for some $n \in \Z$.
This $n$ must also be a power of $2$.
From 1 plus Power of 2 is not Perfect Power except 9 we have:
:$1 + 2^n = a^b$
has only one solution $\tuple {n, a, b} = \tuple {3, 3, 2}$.
But $3$ is not a power of $2$.
Hence no Fermat numbers are perfect powers.
Category:Fermat Numbers
Fermat Number is not Square/Proof 1

== Theorem ==
== Proof ==
Let $n = 0$.
Then $F_0 = 2^{2^0} + 1 = 3$ is not a square.
Let $n \ge 1$.
Then:
Thus by Zero and One are the only Consecutive Perfect Squares, $2^{\left({2^n}\right)} + 1$ is not square.
Category:Fermat Number is not Square
Fermat Number is not Square/Proof 2

== Theorem ==
== Proof ==
Recall the definition of Fermat numbers:
:$F_n = 2^{(2^n)}+1$, where $n = 0, 1, 2, \ldots$
=== Marginal Case ===
$F_0 = 3$ is not a square.
=== General Case ===
It will be shown that Fermat numbers lie between $2$ consecutive squares, thus cannot be itself a square:
Category:Fermat Number is not Square
Fermat Number whose Index is Sum of Integers

== Theorem ==
Let $F_n = 2^{\left({2^n}\right)} + 1$ be the $n$th Fermat number.
Let $k \in \Z_{>0}$.
Then:
:$F_{n + k} - 1 = \left({F_n - 1}\right)^{2^k}$
== Proof ==
By the definition of Fermat number
== Sources ==
* : $\S 2.4$: The rational numbers and some finite fields: Further Exercises $9$
Category:Fermat Numbers
Fermat Prime Conjecture

== False Conjecture ==
All numbers of the form $2^{\paren {2^n} } + 1$, where $n = 0, 1, 2, \ldots$ are prime.
This was postulated by .
== Refutation ==
Although true for $n = 0, 1, 2, 3, 4$, the conjecture fails for $n = 5$.
From Prime Decomposition of $5$th Fermat Number:
:$2^{\paren {2^5} } + 1 = 641 \times 6 \, 700 \, 417$
== Also see ==
* Definition:Fermat Number
* Definition:Fermat Prime
* Prime Decomposition of $5$th Fermat Number
* Prime Decomposition of $6$th Fermat Number
* Prime Decomposition of $7$th Fermat Number
* Prime Decomposition of $8$th Fermat Number
* Prime Decomposition of $9$th Fermat Number
* Prime Decomposition of $10$th Fermat Number
== Historical Note ==
== Sources ==
* : Chapter $\text{IV}$: The Prince of Amateurs
* : $257$
* 
* : $257$
* 
* 
* : Chapter $7$: Patterns in Numbers: Gauss
Category:Fermat Primes
Category:Fermat Numbers
Category:Famous False Conjectures
Fermat Problem

== Theorem ==
Let $\triangle ABC$ be a triangle
Let the vertices of $\triangle ABC$ all have angles less than $120 \degrees$.
Let $\triangle ABG$, $\triangle BCE$ and $\triangle ACF$ be equilateral triangles constructed on the sides of $ABC$.
Let $AE$, $BF$ and $CG$ be constructed.
Let $P$ be the point at which $AE$, $BF$ and $CG$ meet.
:
Then $P$ is the Fermat-Torricelli point of $\triangle ABC$.
If one of vertices of $\triangle ABC$ be of $120 \degrees$ or more, then that vertex is itself the Fermat-Torricelli point of $\triangle ABC$.
== Proof ==
The sum of the distances will be a minimum when the lines $PA$, $PB$ and $PC$ all meet at an angle of $120 \degrees$.
This is a consequence of the Fermat problem being a special case of the Steiner Tree Problem.
Consider the circles which circumscribe the $3$ equilateral triangles $\triangle ABG$, $\triangle BCE$ and $\triangle ACF$.
Consider quadrilaterals formed by $\triangle ABG$, $\triangle BCE$ and $\triangle ACF$ along with another point on each of those circumscribing circles.
Because these are cyclic quadrilaterals, the angle formed with these new points is $120 \degrees$.
It follows that $\Box APBG$, $\Box BPCE$ and $\Box APCF$ are those cyclic quadrilaterals.
Hence $\angle APC = \angle APB = \angle BPC = 120 \degrees$ and the result follows.
== Also known as ==
== Also see ==
* Definition:Extremum Problem, of which this is one of the first instances
== Historical Note ==
== Sources ==
* : Chapter $3$: Equilateral Triangles
* 
* : Henry van Etten: $125$
* 
* 
Category:Fermat Problem
Category:Triangles
Category:Extremum Problems
Fermat Problem/Also known as

== Fermat Problem: Also known as == 
The Fermat Problem is also recognised as a special case of the Steiner Tree Problem for $3$ nodes.
Some refer to it as the Steiner Problem, or Steiner's Problem, for , but there are a number of such problems, and it is a good idea to be able to distinguish between them.
Some sources present this as Fermat's Problem.
== Sources ==
* 
* 
Category:Fermat Problem
Fermat Pseudoprime/Base 3/Examples/91

== Theorem ==
The smallest Fermat pseudoprime to base $3$ is $91$:
:$3^{91} \equiv 3 \pmod {91}$
despite the fact that $91$ is not prime:
:$91 = 7 \times 13$
== Proof ==
We have that:
Here we define Fermat pseudoprime to base $3$ to be a composite number $n$ such that (a slightly stronger result):
:$3^{n - 1} \equiv 1 \pmod n$
Otherwise we have:
:$3^6 = 729 \equiv 3 \pmod 6$
Following our definition, we see that a Fermat pseudoprime to base $3$ cannot be divisible by $3$:
neither can it be divisible by $4$:
nor $10$:
Also such a number cannot be equal to twice a prime greater than $3$:
nor five times a prime greater than $5$:
Therefore only the following numbers less than $91$ remain:
:$25, 49, 77$
and we check:
hence the result.
== Sources ==
* : $91$
* : $91$
Category:Fermat Pseudoprimes
Category:91
Fermat Quotient of 2 wrt p is Square iff p is 3 or 7

== Theorem ==
Let $p$ be a prime number.
The Fermat quotient of $2$ with respect to $p$:
:$\map {q_p} 2 = \dfrac {2^{p - 1} - 1} p$
is a square $p = 3$ or $p = 7$.
=== Generalization ===
== Proof ==
When $p = 3$:
:$\map {q_3} 2 = \dfrac {2^{3 - 1} - 1} 3 = 1$
which is square.
When $p = 7$:
:$\map {q_7} 2 = \dfrac {2^{7 - 1} - 1} 7 = \dfrac {63} 7 = 9$
which is square.
To show that these are the only ones, we observe that since $p$ is an odd prime, write:
:$p = 2 n + 1$ for $n \ge 1$.
Let $\map {q_p} 2$ be a square.
Then $2^{p - 1} - 1 = p x^2$ for some integer $x$.
Note that:
:$2^{p - 1} - 1 = 2^{2 n} - 1 = \paren {2^n - 1} \paren {2^n + 1}$
and we have:
:$\gcd \set {2^n - 1, 2^n + 1} = \gcd \set {2^n - 1, 2} = 1$
so $2^n - 1$ and $2^n + 1$ are coprime.
Hence there are $2$ cases:
=== Case $1$: $p \divides 2^n - 1$ ===
By Divisor of One of Coprime Numbers is Coprime to Other:
:$\gcd \set {\dfrac {2^n - 1} p, 2^n + 1} = 1$
Hence both the numbers are squares.
In particular we have:
:$\exists k \in \Z: 2^n + 1 = k^2$
by 1 plus Power of 2 is not Perfect Power except 9, the only solution to the equation above is:
:$n = k = 3$
This gives $p = 2 n + 1 = 7$.
=== Case $2$: $p \divides 2^n + 1$ ===
By Divisor of One of Coprime Numbers is Coprime to Other:
:$\gcd \set {\dfrac {2^n + 1} p, 2^n - 1} = 1$
Hence both the numbers are squares.
In particular we have:
:$\exists k \in \Z: 2^n - 1 = k^2$
For $n > 1$:
:$2^n - 1 \equiv 3 \pmod 4$
which by Square Modulo 4 is never a square.
Hence we must have $n = 1$.
This gives $p = 2 n + 1 = 3$.
We have already shown that $p = 3, 7$ gives square Fermat quotients.
Hence the result.
== Sources ==
* : $7$
* : $7$
Category:Fermat Quotients
Fermat Quotient of 2 wrt p is Square iff p is 3 or 7/Generalization

== Theorem ==
Let $p$ be a prime number.
The Fermat quotient of $2$ with respect to $p$:
:$\map {q_p} 2 = \dfrac {2^{p - 1} - 1} p$
is a perfect power $p = 3$ or $p = 7$.
== Proof ==
To show that these are the only ones, we observe that since $p$ is an odd prime, write:
:$p = 2 n + 1$ for $n \ge 1$.
Let $\map {q_p} 2$ be a perfect power.
Then $2^{p - 1} - 1 = p x^y$ for some integers $x, y$.
Note that:
:$2^{p - 1} - 1 = 2^{2 n} - 1 = \paren {2^n - 1} \paren {2^n + 1}$
and we have:
:$\gcd \set {2^n - 1, 2^n + 1} = \gcd \set {2^n - 1, 2} = 1$
so $2^n - 1$ and $2^n + 1$ are coprime.
Hence there are $2$ cases:
=== Case $1$: $p \divides 2^n - 1$ ===
By Divisor of One of Coprime Numbers is Coprime to Other:
:$\gcd \set {\dfrac {2^n - 1} p, 2^n + 1} = 1$
Hence both the numbers are perfect $y$th powers.
In particular we have:
:$\exists k \in \Z: 2^n + 1 = k^y$
by 1 plus Power of 2 is not Perfect Power except 9, the only solution to the equation above is:
:$n = k = 3, y = 2$
This gives $p = 2 n + 1 = 7$.
=== Case $2$: $p \divides 2^n + 1$ ===
By Divisor of One of Coprime Numbers is Coprime to Other:
:$\gcd \set {\dfrac {2^n + 1} p, 2^n - 1} = 1$
Hence both the numbers are perfect $y$th powers.
In particular we have:
:$\exists k \in \Z: 2^n - 1 = k^y$
By 1 plus Perfect Power is not Prime Power except for 9, this equation has no solution for $n, k, y > 1$.
Hence we must have $n = 1$.
This gives $p = 2 n + 1 = 3$.
In the main theorem we have already shown that $p = 3, 7$ gives perfect power Fermat quotients.
Hence the result.
Category:Fermat Quotients
Fermat Set is Diophantine Quadruple

== Theorem ==
The Fermat set $F = \left\{{1, 3, 8, 120}\right\}$ is a Diophantine quadruple:
:$\forall a, b \in F: a \ne b: a b + 1 = n^2$
for some $n \in \Z$.
== Proof ==
== Sources ==
* 
* : $120$
* 
Category:Diophantine m-Tuples
Ferrari's Method/Also presented as

== Ferrari's Method: Also presented as ==
Ferrari's method can also be presented in the following form:
Let $P$ be the quartic equation:
:$x^4 + a_3 x^3 + a_2 x^2 + a_1 x + a_0 = 0$
Then $P$ has solutions:
:$x = \dfrac {-p \pm \sqrt {p^2 - 8 q} } 4$
where:
where $y_1$ is a real solution to the cubic:
:$y^3 - a_2 y^2 + \paren {a_1 a_3 - 4 a_0} y - \paren { {a_1}^2 + a_0 {a_3}^2 - 4 a_0 a_2} = 0$
== Historical Note ==
== Sources ==
* : $3$: Elementary Analytic Methods: $3.8$ Algebraic Equations: Solution of Quartic Equations: $3.8.3$
* : $\S 9$: Solutions of Algebraic Equations: Quartic Equation: $x^4 + a_1 x^3 + a_2 x^2 + a_3 x + a_4 = 0$: $9.6$, $9.7$
* : $\S 5$: Solutions of Algebraic Equations: Quartic Equation: $x^4 + a_1 x^3 + a_2 x^2 + a_3 x + a_4 = 0$: $5.6.$, $5.7.$
Category:Ferrari's Method
Feuerbach's Theorem

== Theorem ==
Let $\triangle ABC$ be a triangle.
The Feuerbach circle of $\triangle ABC$ is tangent to:
:the incircle of $\triangle ABC$
and:
:the $3$ excircles of $\triangle ABC$.
:
== Proof ==
Recall the Third Fontené Theorem:
:the pedal circle of a point $P$ is tangent to the nine point circle
:
:$P$ and its isogonal conjugate $P^{-1}$ lie on a line through the circumcenter.
Let $P$ be either the incenter or an excenter of $\triangle ABC$.
By Isogonal Conjugate of Incenter or Excenter is Itself, we have $P = P^{-1}$.
As $P$ and $P^{-1}$ are the same point, they both trivially lie on a straight line through the circumcenter of $\triangle ABC$.
Hence by the Third Fontené Theorem the pedal circle of $P$ is tangent to the nine point circle.
Then from: 
:Pedal Circle of Incenter is Incircle
:Pedal Circle of Excenter is Excircle
the result follows. 
== Also see ==
* Nine Point Circle Theorem
== Historical Note ==
== Sources ==
* : $9$
* : $9$
* 
* : Exercise $\text {III}.64$
* 
* 
* 
* 
* 
Category:Feuerbach Circles
Category:Triangles
Category:Circles
Fibonacci's Greedy Algorithm

== Algorithm ==
Let $\dfrac p q$ denote a proper fraction expressed in canonical form.
Fibonacci's greedy algorithm is a greedy algorithm which calculates a sequence of distinct unit fractions which together sum to $\dfrac p q$:
Fibonacci's Greedy Algorithm is as follows:
:$(1) \quad$ Let $p = x_0$ and $q = y_0$ and set $k = 0$.
:$(2) \quad$ Is $x_k = 1$? If so, the algorithm has finished.
:$(3) \quad$ Find the largest unit fraction $\dfrac 1 {m_k}$ less than $\dfrac {x_k} {y_k}$. 
:$(4) \quad$ Calculate $\dfrac {x_{k + 1} } {y_{k + 1} } = \dfrac {x_k} {y_k} - \dfrac 1 {m_k}$ expressed in canonical form.
:$(5) \quad$ Go to step $(2)$.
== Also see ==
* Proper Fraction can be Expressed as Finite Sum of Unit Fractions/Fibonacci's Greedy Algorithm, which proves that Fibonacci's Greedy Algorithm works as expected
== Sources ==
* 
* : Egyptian Fractions
Category:Greedy Algorithms
Category:Fibonacci's Greedy Algorithm
Fibonacci Nim/Examples/1000

== Example of Game of Fibonacci Nim ==
Let a game of Fibonacci nim between player $\text A$ and player $\text B$ have a starting pile of $1000$ counters.
The optimal strategy for player $\text A$ is to take $13$ counters.
== Proof ==
Expressed in Zeckendorf representation:
:$1000 = 987 + 13 = F_{16} + F_7$
That is:
:$1000 = F_{k_1} + F_{k_2} + \cdots + F_{k_r}$
where $k_1 = 16$ and $k_2 = k_r = 7$.
The maximum number of counters that can be taken here is $1000 - 1 = 999$.
By Optimal Strategy for Fibonacci Nim, player $\text A$ can force a win it is possible to take $F_{k_r}$ counters.
In this case, $F_{k_r} = 13$.
== Sources ==
* : $\S 1.2.8$: Fibonacci Numbers: Exercise $37$
Category:Fibonacci Nim