Talk:Special pythagorean triplet: Difference between revisions

Note that the required triplet isn't primitive contra to my earlier suggestion...
(Final solution? Last guess? See the F# which seems to work even if this description is still confused!)
(Note that the required triplet isn't primitive contra to my earlier suggestion...)
 
(3 intermediate revisions by one other user not shown)
Line 16:
 
The task description says there is only one triple with a + b + c = 1000, so it must be a primitive one. --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 18:14, 31 August 2021 (UTC)
::...or not - of course that doesn't follow and the triplet isn't a primitive one. Doh! --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 17:23, 6 September 2021 (UTC)
 
I have added three observations to the list above which remove the requirement for searching which I think may need explanation. For a given n when z-n is even identify a value g such that n+(g-1)+(g+1)=z (eg 200,399,401). The problem may be rewritten as n<sup>2</sup>=(g+x)<sup>2</sup>-(g-x)<sup>2</sup>. (g+x)<sup>2</sup>-(g-x)<sup>2</sup> is 4xg. Therefore 4g must be a factor of n<sup>2</sup>. To determine x I divide n<sup>2</sup> by 4g. Let me work this for n=200. g=400 {(1000-n)/2}. 4g=1600. 40,000/1600=25 so the solution is 200,400-25,400+25. When z-n is odd similar logic applies identifying g such that n+g+(g+1)=z and solving for x: n<sup>2</sup>=(g+1+x)<sup>2</sup>-(g-x)<sup>2</sup>=4gx+2x+2g+1.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:06, 1 September 2021 (UTC)
 
=== No description ===
If you are going to pilfer problems from another site you should at least copy the actual problem description over, maybe slightly reworded, and attempt to add some value to it, in this case perhaps (as above) brute force vs. smarter and/or (as per F# entry) solutions for 10^3..10^9. Note that Project Euler is always "find the secret answer" whereas this site is/should be more like "prove the only solution is 200,375,425". --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 11:42, 2 September 2021 (UTC)
3,028

edits