I have written a VBA macro that generates a primitive Pythagorean triple based on the Tree of primitive Pythagorean triples algorithm. This algorithm generates all primitive Pythagorean triples when traversed in order. The macro includes a userform with a textbox where you can enter any number. The computation time of the algorithm is logarithmic with respect to the size of the number entered in the textbox. By default, the size of the number is limited by the floating-point representation, but I have added VBA functions that perform basic operations using string variables, which allows for much larger numbers to be used.
In addition to the textbox, there is a checkbox that allows you to choose between a primitive Pythagorean triple and one with shared factors. I have also implemented an algorithm that assigns a number to each pair of numbers, allowing for every number to be associated with a Pythagorean triple. If you choose a triple with shared factors, the macro first divides the entered number into a pair of numbers and calculates the primitive Pythagorean triple from one of the pair's numbers, while the other number serves as a factor.
The Excel file containing the macro can be downloaded from the following link. Once downloaded, the macro can be launched by clicking a designated control button on the first worksheet. It is important to note that before using the macro, you will need to enable macro execution in Excel settings.
Here is a figure, where the Excel VBA macro calculated the Pythagorean triple associated with the googol number.
Recently I have written a python code in Google Colab for this problem with some explanation. Here is the link.