« first day    last day (16 days later) » 

01:02
Btw, just in case you overlooked it, that's me in that complexity discussion and I'm not getting notifications...
I noticed it was you. I didn't realise you weren't getting notifications.
I get notifications even when someone doesn't @ me, but you aren't the first person who said they don't when they aren't @'d.
01:20
You get them when you're the author of the question/answer. Otherwise I think you shouldn't. Do you?
01:32
Just realized I might've sounded reproachful/angry/blaming there (can't find the right word). Not the case :-)
Oh, I didn't take it that way, no worries.
I seem to get notifications every time there is a reply on a thread I've commented on, even if I'm not @'d.
Maybe I'm part of a secret A/B test to see if they can get me to spend more time on Stack Overflow if they give me more notifications.
 
4 hours later…
05:11
Patrick's limit 500000 leads to 79582 triples (a,b,c) with 45084 different c-values, of which 20731 are prime. And the composites don't seem to have many factors. Looks like I'd indeed get many small classes. If the c in target ab/c² is prime, then ab/c² = pq/r² + xy/z² = (pqz²+xyr²)/(rz)² can only be if w.l.o.g. r=c and I can cancel z² in the last term. But that means z²|(pqz²+xyc²) and thus z²|(xyc²) and thus z|c and thus z=c. So pq/r² and xy/z² are actually pq/c² and xy/c².
In otherwords, for a triple (a,b,c) with prime c we only need to look for a pair of numbers from the "class" c. Which is small. Composites I guess similar.
If any of the above is faulty, I blame my sleep deprivation.
 
3 hours later…
07:56
Simpler approach: For given ratio ab/c², find ratios pq/r² and xy/z² that add up to it like this: Let c=de where d is c's largest prime factor. Then d must also divide r or z. So go through all ratios pq/r² where c|r (that's probably very few), and look for ab/c² - pq/r² in a hash set. So it's similar to your solution but could be thousands of times faster.
 
6 hours later…
13:26
Not sure about thousands - if we assume that 1/p of the numbers have a prime factor p, then it should be faster by E(1/d). I'm not sure what the distribution of the largest prime factor is, but the mean is probably not on the order of sqrt(n) for the numbers 1..n.
It's more likely something like log(n).
Oh, I read your second comment before the first one. Since they're primitive Pythagorean triples, c is not likely to have lots of small factors, indeed.
Yes, that seems like it has a lot of potential.
 
4 hours later…
17:23
lol... I just reread the comments under the question and Patrick wrote "These numbers are irrational".
:D
18:01
I wish there were outputs. I feel uneasy not being able to compare outputs.
Oh, I know... I should accuse you of not experimentally verifying your solution so that you then write some code to do that which I can then use.

« first day    last day (16 days later) »