from math import gcd
from itertools import chain, count, islice
def gen(): # generator of terms
return chain.from_iterable((i, n-i) for n in count(2) for i in range(1, n) if gcd(i, n-i)==1)
lst = list(islice(gen(), 10**7))
print(lst[-2], lst[-1])
To embed this program on your website, copy the following code and paste it into your website's HTML: