- f[x_] := {{x[[1]], x[[3]], 3 x[[1]] x[[3]] - x[[2]]}, {x[[2]], x[[3]],3 x[[2]] x[[3]] - x[[1]]}};
- g[x_] := Flatten[f /@ x, 1];
- h[x_] := Select[g[x], #[[3]] < 10^10 &]
- Answer = NestWhileList[h, {{1, 2, 5}}, Length[#] > 0 &];
- Flatten[Answer, 1]
- (Flatten[Answer, 1] // Length) + 2
复制代码- {{1, 2, 5}, {1, 5, 13}, {2, 5, 29}, {1, 13, 34}, {5, 13, 194}, {2, 29,169}, {5, 29, 433}, {1, 34, 89}, {13, 34, 1325}, {5, 194, 2897}, {13, 194, 7561}, {2, 169, 985},{29,169,14701}, {5, 433, 6466}, {29, 433, 37666}, {1, 89, 233}, {34, 89, 9077}, {13, 1325, 51641}, {34, 1325, 135137}, {5, 2897, 43261}, {194, 2897, 1686049},{13,7561,294685}, {194, 7561, 4400489}, {2, 985, 5741}, {169, 985, 499393}, {29, 14701, 1278818}, {169, 14701, 7453378}, {5, 6466, 96557}, {433, 6466, 8399329}, {29, 37666, 3276509}, {433, 37666, 48928105}, {1, 233, 610}, {89, 233, 62210}, {34, 9077, 925765}, {89, 9077, 2423525}, {13, 51641, 2012674}, {1325,51641,205272962}, {34, 135137, 13782649}, {1325, 135137, 537169541}, {5, 43261, 646018}, {2897, 43261, 375981346}, {194, 1686049, 981277621}, {13,294685, 11485154}, {7561, 294685, 6684339842}, {194, 4400489,2561077037}, {2, 5741, 33461}, {985, 5741, 16964653}, {169, 499393, 253191266}, {985,499393, 1475706146}, {29, 1278818, 111242465}, {169, 7453378, 3778847945}, {5, 96557, 1441889}, {6466,96557, 1873012681}, {29, 3276509, 285018617}, {1,610, 1597}, {233,610, 426389}, {89, 62210, 16609837}, {233, 62210, 43484701}, {34,925765, 94418953}, {89, 2423525, 647072098}, {13, 2012674, 78442645}, {34,13782649, 1405695061}, {5, 646018, 9647009}, {13,11485154, 447626321}, {2, 33461, 195025}, {5741, 33461,576298801}, {29, 111242465, 9676815637}, {5,1441889, 21531778}, {1,1597, 4181}, {610, 1597, 2922509}, {233, 426389, 298045301}, {610,426389, 780291637}, {89, 16609837, 4434764269}, {34,94418953,9629807441}, {13, 78442645, 3057250481}, {5, 9647009,144059117}, {2, 195025, 1136689}, {5, 21531778, 321534781}, {1, 4181, 10946}, {1597,4181,20031170}, {610, 2922509,5348189873}, {5, 144059117, 2151239746}, {2, 1136689, 6625109}, {5, 321534781, 4801489937}, {1, 10946, 28657}, {4181,10946, 137295677}, {2, 6625109, 38613965}, {1, 28657, 75025}, {10946,28657, 941038565}, {2, 38613965, 225058681}, {1, 75025,196418}, {28657,75025,6449974274}, {2, 225058681, 1311738121}, {1,196418, 514229}, {2, 1311738121, 7645370045}, {1, 514229,1346269}, {1, 1346269, 3524578}, {1,3524578, 9227465}, {1, 9227465,24157817}, {1, 24157817, 63245986}, {1, 63245986, 165580141}, {1, 165580141, 433494437}, {1, 433494437, 1134903170}, {1,1134903170, 2971215073}, {1, 2971215073, 7778742049}}
- 107
复制代码 10^10以内的解除{1,1,1}和{1,1,2}外都在此处了,共计107个。 |