(11C) Sums of Three Squares
|
01-07-2019, 12:09 PM
(This post was last modified: 01-07-2019 12:10 PM by Gamo.)
Post: #1
|
|||
|
|||
(11C) Sums of Three Squares
Which whole numbers are expressible as sums of three (integer) squares?
This program solve the Sums of Three Squares. [ X^2 + Y^2 + Z^2 = N ] Given N program will find pair of X,Y and Z that equal to N where X ≤ Y ≤ Z ------------------------------------------------------------------- Procedure: 1.) N [A] display Z [Rv] Y [Rv] X [R/S] if it is more than one solution and continue until steps 2.) shown mean finish. 2.) N [A] display 0.000000000 then 0.00 indicate that "No Solution" ------------------------------------------------------ Example: X^2 + Y^2 + Z^2 = 9876543210 9876543210 [A] display 99380 [Rv] 391 [Rv] 77 [R/S] 99380 [Rv] 359 [Rv] 173 [R/S] "0.000000000" 0.00 Answer: X=77 Y=391 Z=99380 X=173 Y=359 Z=99380 ---------------------------------------------------- Program: Code:
Gamo |
|||
01-07-2019, 05:06 PM
Post: #2
|
|||
|
|||
RE: (11C) Sums of Three Squares
(01-07-2019 12:09 PM)Gamo Wrote: Example: there are many, many more ! X=388 Y=455 Z=99379 X=541 Y=680 Z=99377 X=553 Y=805 Z=99376 X=100 Y=1241 Z=99373 X=385 Y=1184 Z=99373 X=351 Y=1275 Z=99372 X=145 Y=1388 Z=99371 X=313 Y=1360 Z=99371 X=400 Y=1337 Z=99371 X=812 Y=1135 Z=99371 ... It might be better to test smaller number, say Year 2019. 2019 = 1² + 13² + 43² = 5² + 25² + 37² = 7² + 11² + 43² = 7² + 17² + 41² = 11² + 23² + 37² = 13² + 13² + 41² = 13² + 25² + 35² = 17² + 19² + 37² = 23² + 23² + 31² |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)