Talk:Special pythagorean triplet: Difference between revisions

Final solution? Last guess? See the F# which seems to work even if this description is still confused!
No edit summary
(Final solution? Last guess? See the F# which seems to work even if this description is still confused!)
Line 1:
For those paying "attention to timings" and more importantly for those paying attention to other comments I have made on these Euler tasks about filling RC with solutions worse than I would expect from a schoolboy with a pencil, considering n<sup>2</sup>+g<sup>2</sup>=i<sup>2</sup> and n+g+i=z n<g<i note the following:
the largest value n can take is 332(z-2)/3 with g=333n+1 and i=335n+1
the smallest value of i<sup>2</sup>-g<sup>2</sup> is when g=(z-1-n)/2 and i=z-g
if i<sup>2</sup>-g<sup>2</sup> is greater than n<sup>2</sup> then there can be no solution for this n with a smaller g
Line 17:
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)
 
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 n-z-n is even identify a value g such that n+(g-1)+(g+1)=1000z (eg 3200,498399,499401). 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 n-z-n is odd similar logic applies identifying g such that n+g+(g+1)=1000z 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)
2,171

edits