m = 3*p + 5*q = 5*r + 7*s ============================ m {p, q} {r, s} =============================== 50 {5, 7} {3, 5} 146 {17, 19} {11,13} 866 {107,109} {71,73} 2162 {269,271} {179,181} 4178 {521, 523} {347,349} 8362 {1039,1049} {691,701} 14372 {1789,1801} {1193,1201} 17138 {2141,2143} {1427,1429} 19094 {2383,2389} {1583,1597} 22504 {2803,2819} {1873,1877} 25346 {3167,3169} {2111,2113} 26764 {3343,3347} {2221,2237} 27544 {3433,3449} {2293,2297} 35074 {4373,4391} {2917,2927} 42634 {5323,5333} {3547,3557} 45218 {5651,5653} {3767,3769} 54184 {6763,6779} {4513,4517} 59554 {7433,7451} {4957,4967} ==================================