Show the Lagrange Four Square Theorem for
91
For any natural number (p), we write as
p = a2 + b2 + c2 + d2
Floor(√91) = Floor(9.5393920141695)
Floor(9.5393920141695) = 9
This is called max_a
Find the first value of a such that
a2 ≥ n/4
Start with min_a = 0 and increase by 1
Continue until we reach or breach n/4 → 91/4 = 22.75
When min_a = 5, then it is a2 = 25 ≥ 22.75, so min_a = 5
(0, 9)
Find max_b which is Floor(√n - a2)
max_b = Floor(√91 - 02)
max_b = Floor(√91 - 0)
max_b = Floor(√91)
max_b = Floor(9.5393920141695)
max_b = 9
Find b such that b2 ≥ (n - a2)/3
Call it min_b
Start with min_b = 0 and increase by 1
Go until (n - a2)/3 → (91 - 02)/3 = 30.333333333333
When min_b = 6, then it is b2 = 36 ≥ 30.333333333333, so min_b = 6
(6, 9)
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 02 - 62)
max_c = Floor(√91 - 0 - 36)
max_c = Floor(√55)
max_c = Floor(7.4161984870957)
max_c = 7
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 02 - 62)/2 = 27.5
When min_c = 6, then it is c2 = 36 ≥ 27.5, so min_c = 6
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 02 - 62 - 62
max_d = √91 - 0 - 36 - 36
max_d = √19
max_d = 4.3588989435407
Since max_d = 4.3588989435407 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 02 - 62 - 72
max_d = √91 - 0 - 36 - 49
max_d = √6
max_d = 2.4494897427832
Since max_d = 2.4494897427832 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 02 - 72)
max_c = Floor(√91 - 0 - 49)
max_c = Floor(√42)
max_c = Floor(6.4807406984079)
max_c = 6
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 02 - 72)/2 = 21
When min_c = 5, then it is c2 = 25 ≥ 21, so min_c = 5
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 02 - 72 - 52
max_d = √91 - 0 - 49 - 25
max_d = √17
max_d = 4.1231056256177
Since max_d = 4.1231056256177 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 02 - 72 - 62
max_d = √91 - 0 - 49 - 36
max_d = √6
max_d = 2.4494897427832
Since max_d = 2.4494897427832 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 02 - 82)
max_c = Floor(√91 - 0 - 64)
max_c = Floor(√27)
max_c = Floor(5.1961524227066)
max_c = 5
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 02 - 82)/2 = 13.5
When min_c = 4, then it is c2 = 16 ≥ 13.5, so min_c = 4
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 02 - 82 - 42
max_d = √91 - 0 - 64 - 16
max_d = √11
max_d = 3.3166247903554
Since max_d = 3.3166247903554 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 02 - 82 - 52
max_d = √91 - 0 - 64 - 25
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 02 - 92)
max_c = Floor(√91 - 0 - 81)
max_c = Floor(√10)
max_c = Floor(3.1622776601684)
max_c = 3
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 02 - 92)/2 = 5
When min_c = 3, then it is c2 = 9 ≥ 5, so min_c = 3
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 02 - 92 - 32
max_d = √91 - 0 - 81 - 9
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (0, 9, 3, 1) is an integer solution proven below
02 + 92 + 32 + 12 → 0 + 81 + 9 + 1 = 91
Find max_b which is Floor(√n - a2)
max_b = Floor(√91 - 12)
max_b = Floor(√91 - 1)
max_b = Floor(√90)
max_b = Floor(9.4868329805051)
max_b = 9
Find b such that b2 ≥ (n - a2)/3
Call it min_b
Start with min_b = 0 and increase by 1
Go until (n - a2)/3 → (91 - 12)/3 = 30
When min_b = 6, then it is b2 = 36 ≥ 30, so min_b = 6
(6, 9)
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 12 - 62)
max_c = Floor(√91 - 1 - 36)
max_c = Floor(√54)
max_c = Floor(7.3484692283495)
max_c = 7
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 12 - 62)/2 = 27
When min_c = 6, then it is c2 = 36 ≥ 27, so min_c = 6
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 12 - 62 - 62
max_d = √91 - 1 - 36 - 36
max_d = √18
max_d = 4.2426406871193
Since max_d = 4.2426406871193 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 12 - 62 - 72
max_d = √91 - 1 - 36 - 49
max_d = √5
max_d = 2.2360679774998
Since max_d = 2.2360679774998 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 12 - 72)
max_c = Floor(√91 - 1 - 49)
max_c = Floor(√41)
max_c = Floor(6.4031242374328)
max_c = 6
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 12 - 72)/2 = 20.5
When min_c = 5, then it is c2 = 25 ≥ 20.5, so min_c = 5
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 12 - 72 - 52
max_d = √91 - 1 - 49 - 25
max_d = √16
max_d = 4
Since max_d = 4, then (a, b, c, d) = (1, 7, 5, 4) is an integer solution proven below
12 + 72 + 52 + 42 → 1 + 49 + 25 + 16 = 91
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 12 - 72 - 62
max_d = √91 - 1 - 49 - 36
max_d = √5
max_d = 2.2360679774998
Since max_d = 2.2360679774998 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 12 - 82)
max_c = Floor(√91 - 1 - 64)
max_c = Floor(√26)
max_c = Floor(5.0990195135928)
max_c = 5
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 12 - 82)/2 = 13
When min_c = 4, then it is c2 = 16 ≥ 13, so min_c = 4
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 12 - 82 - 42
max_d = √91 - 1 - 64 - 16
max_d = √10
max_d = 3.1622776601684
Since max_d = 3.1622776601684 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 12 - 82 - 52
max_d = √91 - 1 - 64 - 25
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (1, 8, 5, 1) is an integer solution proven below
12 + 82 + 52 + 12 → 1 + 64 + 25 + 1 = 91
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 12 - 92)
max_c = Floor(√91 - 1 - 81)
max_c = Floor(√9)
max_c = Floor(3)
max_c = 3
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 12 - 92)/2 = 4.5
When min_c = 3, then it is c2 = 9 ≥ 4.5, so min_c = 3
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 12 - 92 - 32
max_d = √91 - 1 - 81 - 9
max_d = √0
max_d = 0
Since max_d = 0, then (a, b, c, d) = (1, 9, 3, 0) is an integer solution proven below
12 + 92 + 32 + 02 → 1 + 81 + 9 + 0 = 91
Find max_b which is Floor(√n - a2)
max_b = Floor(√91 - 22)
max_b = Floor(√91 - 4)
max_b = Floor(√87)
max_b = Floor(9.3273790530888)
max_b = 9
Find b such that b2 ≥ (n - a2)/3
Call it min_b
Start with min_b = 0 and increase by 1
Go until (n - a2)/3 → (91 - 22)/3 = 29
When min_b = 6, then it is b2 = 36 ≥ 29, so min_b = 6
(6, 9)
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 22 - 62)
max_c = Floor(√91 - 4 - 36)
max_c = Floor(√51)
max_c = Floor(7.1414284285429)
max_c = 7
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 22 - 62)/2 = 25.5
When min_c = 6, then it is c2 = 36 ≥ 25.5, so min_c = 6
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 22 - 62 - 62
max_d = √91 - 4 - 36 - 36
max_d = √15
max_d = 3.8729833462074
Since max_d = 3.8729833462074 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 22 - 62 - 72
max_d = √91 - 4 - 36 - 49
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 22 - 72)
max_c = Floor(√91 - 4 - 49)
max_c = Floor(√38)
max_c = Floor(6.164414002969)
max_c = 6
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 22 - 72)/2 = 19
When min_c = 5, then it is c2 = 25 ≥ 19, so min_c = 5
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 22 - 72 - 52
max_d = √91 - 4 - 49 - 25
max_d = √13
max_d = 3.605551275464
Since max_d = 3.605551275464 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 22 - 72 - 62
max_d = √91 - 4 - 49 - 36
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 22 - 82)
max_c = Floor(√91 - 4 - 64)
max_c = Floor(√23)
max_c = Floor(4.7958315233127)
max_c = 4
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 22 - 82)/2 = 11.5
When min_c = 4, then it is c2 = 16 ≥ 11.5, so min_c = 4
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 22 - 82 - 42
max_d = √91 - 4 - 64 - 16
max_d = √7
max_d = 2.6457513110646
Since max_d = 2.6457513110646 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 22 - 92)
max_c = Floor(√91 - 4 - 81)
max_c = Floor(√6)
max_c = Floor(2.4494897427832)
max_c = 2
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 22 - 92)/2 = 3
When min_c = 2, then it is c2 = 4 ≥ 3, so min_c = 2
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 22 - 92 - 22
max_d = √91 - 4 - 81 - 4
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Find max_b which is Floor(√n - a2)
max_b = Floor(√91 - 32)
max_b = Floor(√91 - 9)
max_b = Floor(√82)
max_b = Floor(9.0553851381374)
max_b = 9
Find b such that b2 ≥ (n - a2)/3
Call it min_b
Start with min_b = 0 and increase by 1
Go until (n - a2)/3 → (91 - 32)/3 = 27.333333333333
When min_b = 6, then it is b2 = 36 ≥ 27.333333333333, so min_b = 6
(6, 9)
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 32 - 62)
max_c = Floor(√91 - 9 - 36)
max_c = Floor(√46)
max_c = Floor(6.7823299831253)
max_c = 6
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 32 - 62)/2 = 23
When min_c = 5, then it is c2 = 25 ≥ 23, so min_c = 5
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 32 - 62 - 52
max_d = √91 - 9 - 36 - 25
max_d = √21
max_d = 4.5825756949558
Since max_d = 4.5825756949558 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 32 - 62 - 62
max_d = √91 - 9 - 36 - 36
max_d = √10
max_d = 3.1622776601684
Since max_d = 3.1622776601684 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 32 - 72)
max_c = Floor(√91 - 9 - 49)
max_c = Floor(√33)
max_c = Floor(5.744562646538)
max_c = 5
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 32 - 72)/2 = 16.5
When min_c = 5, then it is c2 = 25 ≥ 16.5, so min_c = 5
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 32 - 72 - 52
max_d = √91 - 9 - 49 - 25
max_d = √8
max_d = 2.8284271247462
Since max_d = 2.8284271247462 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 32 - 82)
max_c = Floor(√91 - 9 - 64)
max_c = Floor(√18)
max_c = Floor(4.2426406871193)
max_c = 4
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 32 - 82)/2 = 9
When min_c = 3, then it is c2 = 9 ≥ 9, so min_c = 3
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 32 - 82 - 32
max_d = √91 - 9 - 64 - 9
max_d = √9
max_d = 3
Since max_d = 3, then (a, b, c, d) = (3, 8, 3, 3) is an integer solution proven below
32 + 82 + 32 + 32 → 9 + 64 + 9 + 9 = 91
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 32 - 82 - 42
max_d = √91 - 9 - 64 - 16
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 32 - 92)
max_c = Floor(√91 - 9 - 81)
max_c = Floor(√1)
max_c = Floor(1)
max_c = 1
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 32 - 92)/2 = 0.5
When min_c = 0, then it is c2 = 1 ≥ 0.5, so min_c = 0
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 32 - 92 - 02
max_d = √91 - 9 - 81 - 0
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (3, 9, 0, 1) is an integer solution proven below
32 + 92 + 02 + 12 → 9 + 81 + 0 + 1 = 91
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 32 - 92 - 12
max_d = √91 - 9 - 81 - 1
max_d = √0
max_d = 0
Since max_d = 0, then (a, b, c, d) = (3, 9, 1, 0) is an integer solution proven below
32 + 92 + 12 + 02 → 9 + 81 + 1 + 0 = 91
Find max_b which is Floor(√n - a2)
max_b = Floor(√91 - 42)
max_b = Floor(√91 - 16)
max_b = Floor(√75)
max_b = Floor(8.6602540378444)
max_b = 8
Find b such that b2 ≥ (n - a2)/3
Call it min_b
Start with min_b = 0 and increase by 1
Go until (n - a2)/3 → (91 - 42)/3 = 25
When min_b = 5, then it is b2 = 25 ≥ 25, so min_b = 5
(5, 8)
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 42 - 52)
max_c = Floor(√91 - 16 - 25)
max_c = Floor(√50)
max_c = Floor(7.0710678118655)
max_c = 7
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 42 - 52)/2 = 25
When min_c = 5, then it is c2 = 25 ≥ 25, so min_c = 5
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 42 - 52 - 52
max_d = √91 - 16 - 25 - 25
max_d = √25
max_d = 5
Since max_d = 5, then (a, b, c, d) = (4, 5, 5, 5) is an integer solution proven below
42 + 52 + 52 + 52 → 16 + 25 + 25 + 25 = 91
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 42 - 52 - 62
max_d = √91 - 16 - 25 - 36
max_d = √14
max_d = 3.7416573867739
Since max_d = 3.7416573867739 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 42 - 52 - 72
max_d = √91 - 16 - 25 - 49
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (4, 5, 7, 1) is an integer solution proven below
42 + 52 + 72 + 12 → 16 + 25 + 49 + 1 = 91
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 42 - 62)
max_c = Floor(√91 - 16 - 36)
max_c = Floor(√39)
max_c = Floor(6.2449979983984)
max_c = 6
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 42 - 62)/2 = 19.5
When min_c = 5, then it is c2 = 25 ≥ 19.5, so min_c = 5
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 42 - 62 - 52
max_d = √91 - 16 - 36 - 25
max_d = √14
max_d = 3.7416573867739
Since max_d = 3.7416573867739 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 42 - 62 - 62
max_d = √91 - 16 - 36 - 36
max_d = √3
max_d = 1.7320508075689
Since max_d = 1.7320508075689 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 42 - 72)
max_c = Floor(√91 - 16 - 49)
max_c = Floor(√26)
max_c = Floor(5.0990195135928)
max_c = 5
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 42 - 72)/2 = 13
When min_c = 4, then it is c2 = 16 ≥ 13, so min_c = 4
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 42 - 72 - 42
max_d = √91 - 16 - 49 - 16
max_d = √10
max_d = 3.1622776601684
Since max_d = 3.1622776601684 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 42 - 72 - 52
max_d = √91 - 16 - 49 - 25
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (4, 7, 5, 1) is an integer solution proven below
42 + 72 + 52 + 12 → 16 + 49 + 25 + 1 = 91
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 42 - 82)
max_c = Floor(√91 - 16 - 64)
max_c = Floor(√11)
max_c = Floor(3.3166247903554)
max_c = 3
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 42 - 82)/2 = 5.5
When min_c = 3, then it is c2 = 9 ≥ 5.5, so min_c = 3
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 42 - 82 - 32
max_d = √91 - 16 - 64 - 9
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Find max_b which is Floor(√n - a2)
max_b = Floor(√91 - 52)
max_b = Floor(√91 - 25)
max_b = Floor(√66)
max_b = Floor(8.124038404636)
max_b = 8
Find b such that b2 ≥ (n - a2)/3
Call it min_b
Start with min_b = 0 and increase by 1
Go until (n - a2)/3 → (91 - 52)/3 = 22
When min_b = 5, then it is b2 = 25 ≥ 22, so min_b = 5
(5, 8)
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 52 - 52)
max_c = Floor(√91 - 25 - 25)
max_c = Floor(√41)
max_c = Floor(6.4031242374328)
max_c = 6
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 52 - 52)/2 = 20.5
When min_c = 5, then it is c2 = 25 ≥ 20.5, so min_c = 5
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 52 - 52 - 52
max_d = √91 - 25 - 25 - 25
max_d = √16
max_d = 4
Since max_d = 4, then (a, b, c, d) = (5, 5, 5, 4) is an integer solution proven below
52 + 52 + 52 + 42 → 25 + 25 + 25 + 16 = 91
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 52 - 52 - 62
max_d = √91 - 25 - 25 - 36
max_d = √5
max_d = 2.2360679774998
Since max_d = 2.2360679774998 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 52 - 62)
max_c = Floor(√91 - 25 - 36)
max_c = Floor(√30)
max_c = Floor(5.4772255750517)
max_c = 5
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 52 - 62)/2 = 15
When min_c = 4, then it is c2 = 16 ≥ 15, so min_c = 4
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 52 - 62 - 42
max_d = √91 - 25 - 36 - 16
max_d = √14
max_d = 3.7416573867739
Since max_d = 3.7416573867739 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 52 - 62 - 52
max_d = √91 - 25 - 36 - 25
max_d = √5
max_d = 2.2360679774998
Since max_d = 2.2360679774998 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 52 - 72)
max_c = Floor(√91 - 25 - 49)
max_c = Floor(√17)
max_c = Floor(4.1231056256177)
max_c = 4
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 52 - 72)/2 = 8.5
When min_c = 3, then it is c2 = 9 ≥ 8.5, so min_c = 3
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 52 - 72 - 32
max_d = √91 - 25 - 49 - 9
max_d = √8
max_d = 2.8284271247462
Since max_d = 2.8284271247462 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 52 - 72 - 42
max_d = √91 - 25 - 49 - 16
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (5, 7, 4, 1) is an integer solution proven below
52 + 72 + 42 + 12 → 25 + 49 + 16 + 1 = 91
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 52 - 82)
max_c = Floor(√91 - 25 - 64)
max_c = Floor(√2)
max_c = Floor(1.4142135623731)
max_c = 1
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 52 - 82)/2 = 1
When min_c = 0, then it is c2 = 1 ≥ 1, so min_c = 0
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 52 - 82 - 02
max_d = √91 - 25 - 64 - 0
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 52 - 82 - 12
max_d = √91 - 25 - 64 - 1
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (5, 8, 1, 1) is an integer solution proven below
52 + 82 + 12 + 12 → 25 + 64 + 1 + 1 = 91
Find max_b which is Floor(√n - a2)
max_b = Floor(√91 - 62)
max_b = Floor(√91 - 36)
max_b = Floor(√55)
max_b = Floor(7.4161984870957)
max_b = 7
Find b such that b2 ≥ (n - a2)/3
Call it min_b
Start with min_b = 0 and increase by 1
Go until (n - a2)/3 → (91 - 62)/3 = 18.333333333333
When min_b = 5, then it is b2 = 25 ≥ 18.333333333333, so min_b = 5
(5, 7)
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 62 - 52)
max_c = Floor(√91 - 36 - 25)
max_c = Floor(√30)
max_c = Floor(5.4772255750517)
max_c = 5
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 62 - 52)/2 = 15
When min_c = 4, then it is c2 = 16 ≥ 15, so min_c = 4
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 62 - 52 - 42
max_d = √91 - 36 - 25 - 16
max_d = √14
max_d = 3.7416573867739
Since max_d = 3.7416573867739 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 62 - 52 - 52
max_d = √91 - 36 - 25 - 25
max_d = √5
max_d = 2.2360679774998
Since max_d = 2.2360679774998 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 62 - 62)
max_c = Floor(√91 - 36 - 36)
max_c = Floor(√19)
max_c = Floor(4.3588989435407)
max_c = 4
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 62 - 62)/2 = 9.5
When min_c = 4, then it is c2 = 16 ≥ 9.5, so min_c = 4
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 62 - 62 - 42
max_d = √91 - 36 - 36 - 16
max_d = √3
max_d = 1.7320508075689
Since max_d = 1.7320508075689 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 62 - 72)
max_c = Floor(√91 - 36 - 49)
max_c = Floor(√6)
max_c = Floor(2.4494897427832)
max_c = 2
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 62 - 72)/2 = 3
When min_c = 2, then it is c2 = 4 ≥ 3, so min_c = 2
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 62 - 72 - 22
max_d = √91 - 36 - 49 - 4
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Find max_b which is Floor(√n - a2)
max_b = Floor(√91 - 72)
max_b = Floor(√91 - 49)
max_b = Floor(√42)
max_b = Floor(6.4807406984079)
max_b = 6
Find b such that b2 ≥ (n - a2)/3
Call it min_b
Start with min_b = 0 and increase by 1
Go until (n - a2)/3 → (91 - 72)/3 = 14
When min_b = 4, then it is b2 = 16 ≥ 14, so min_b = 4
(4, 6)
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 72 - 42)
max_c = Floor(√91 - 49 - 16)
max_c = Floor(√26)
max_c = Floor(5.0990195135928)
max_c = 5
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 72 - 42)/2 = 13
When min_c = 4, then it is c2 = 16 ≥ 13, so min_c = 4
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 72 - 42 - 42
max_d = √91 - 49 - 16 - 16
max_d = √10
max_d = 3.1622776601684
Since max_d = 3.1622776601684 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 72 - 42 - 52
max_d = √91 - 49 - 16 - 25
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (7, 4, 5, 1) is an integer solution proven below
72 + 42 + 52 + 12 → 49 + 16 + 25 + 1 = 91
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 72 - 52)
max_c = Floor(√91 - 49 - 25)
max_c = Floor(√17)
max_c = Floor(4.1231056256177)
max_c = 4
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 72 - 52)/2 = 8.5
When min_c = 3, then it is c2 = 9 ≥ 8.5, so min_c = 3
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 72 - 52 - 32
max_d = √91 - 49 - 25 - 9
max_d = √8
max_d = 2.8284271247462
Since max_d = 2.8284271247462 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 72 - 52 - 42
max_d = √91 - 49 - 25 - 16
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (7, 5, 4, 1) is an integer solution proven below
72 + 52 + 42 + 12 → 49 + 25 + 16 + 1 = 91
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 72 - 62)
max_c = Floor(√91 - 49 - 36)
max_c = Floor(√6)
max_c = Floor(2.4494897427832)
max_c = 2
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 72 - 62)/2 = 3
When min_c = 2, then it is c2 = 4 ≥ 3, so min_c = 2
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 72 - 62 - 22
max_d = √91 - 49 - 36 - 4
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Find max_b which is Floor(√n - a2)
max_b = Floor(√91 - 82)
max_b = Floor(√91 - 64)
max_b = Floor(√27)
max_b = Floor(5.1961524227066)
max_b = 5
Find b such that b2 ≥ (n - a2)/3
Call it min_b
Start with min_b = 0 and increase by 1
Go until (n - a2)/3 → (91 - 82)/3 = 9
When min_b = 3, then it is b2 = 9 ≥ 9, so min_b = 3
(3, 5)
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 82 - 32)
max_c = Floor(√91 - 64 - 9)
max_c = Floor(√18)
max_c = Floor(4.2426406871193)
max_c = 4
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 82 - 32)/2 = 9
When min_c = 3, then it is c2 = 9 ≥ 9, so min_c = 3
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 82 - 32 - 32
max_d = √91 - 64 - 9 - 9
max_d = √9
max_d = 3
Since max_d = 3, then (a, b, c, d) = (8, 3, 3, 3) is an integer solution proven below
82 + 32 + 32 + 32 → 64 + 9 + 9 + 9 = 91
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 82 - 32 - 42
max_d = √91 - 64 - 9 - 16
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 82 - 42)
max_c = Floor(√91 - 64 - 16)
max_c = Floor(√11)
max_c = Floor(3.3166247903554)
max_c = 3
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 82 - 42)/2 = 5.5
When min_c = 3, then it is c2 = 9 ≥ 5.5, so min_c = 3
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 82 - 42 - 32
max_d = √91 - 64 - 16 - 9
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 82 - 52)
max_c = Floor(√91 - 64 - 25)
max_c = Floor(√2)
max_c = Floor(1.4142135623731)
max_c = 1
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 82 - 52)/2 = 1
When min_c = 0, then it is c2 = 1 ≥ 1, so min_c = 0
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 82 - 52 - 02
max_d = √91 - 64 - 25 - 0
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 82 - 52 - 12
max_d = √91 - 64 - 25 - 1
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (8, 5, 1, 1) is an integer solution proven below
82 + 52 + 12 + 12 → 64 + 25 + 1 + 1 = 91
Find max_b which is Floor(√n - a2)
max_b = Floor(√91 - 92)
max_b = Floor(√91 - 81)
max_b = Floor(√10)
max_b = Floor(3.1622776601684)
max_b = 3
Find b such that b2 ≥ (n - a2)/3
Call it min_b
Start with min_b = 0 and increase by 1
Go until (n - a2)/3 → (91 - 92)/3 = 3.3333333333333
When min_b = 2, then it is b2 = 4 ≥ 3.3333333333333, so min_b = 2
(2, 3)
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 92 - 22)
max_c = Floor(√91 - 81 - 4)
max_c = Floor(√6)
max_c = Floor(2.4494897427832)
max_c = 2
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 92 - 22)/2 = 3
When min_c = 2, then it is c2 = 4 ≥ 3, so min_c = 2
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 92 - 22 - 22
max_d = √91 - 81 - 4 - 4
max_d = √2
max_d = 1.4142135623731
Since max_d = 1.4142135623731 is not an integer, this is not a solution
Determine max_c =Floor(√n - a2 - b2)
max_c = Floor(√91 - 92 - 32)
max_c = Floor(√91 - 81 - 9)
max_c = Floor(√1)
max_c = Floor(1)
max_c = 1
Call it min_b
Start with min_c = 0 and increase by 1
Go until (n - a2 - b2 )/2 → (91 - 92 - 32)/2 = 0.5
When min_c = 0, then it is c2 = 1 ≥ 0.5, so min_c = 0
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 92 - 32 - 02
max_d = √91 - 81 - 9 - 0
max_d = √1
max_d = 1
Since max_d = 1, then (a, b, c, d) = (9, 3, 0, 1) is an integer solution proven below
92 + 32 + 02 + 12 → 81 + 9 + 0 + 1 = 91
See if d is an integer solution which is √n - a2 - b2
max_d = √91 - 92 - 32 - 12
max_d = √91 - 81 - 9 - 1
max_d = √0
max_d = 0
Since max_d = 0, then (a, b, c, d) = (9, 3, 1, 0) is an integer solution proven below
92 + 32 + 12 + 02 → 81 + 9 + 1 + 0 = 91