@VisheshMangla No it's not programmatically very tough, did you even read my solution. I show how we can heavily constrain the search for a = 12,24,40,60,... down to small even numbers which are members of one primitive PT and one non-primitive PT, i.e. {(3,4,5), (5,12,13), (8,15,17), (7,24,25), (9,40,41), (11,60,61), ... } and for b, primitive PTs where the prime leg is p=3, 5, 7..., thus {(3,4,5), (5,12,13), (7,24,25), (11,60,61)...}.