OFFSET
1,2
COMMENTS
A328971(n) / a(n) should contain all reduced fractions between 1 and sqrt(2) + 1 without duplicates.
A328971(n) (numerators) is built from the difference between the length of the hypotenuse (A020882) and the difference between the two legs (A120682) of the n-th primitive Pythagorean triangle.
a(n) is built from the difference between the sum of the length of the legs (A120681) and the hypotenuse of the n-th primitive Pythagorean triangle.
Then both numbers are divided by their GCD to get the reduced fraction.
All primitive Pythagorean triangles are sorted first on hypotenuse, then on long leg.
LINKS
EXAMPLE
For n=13 we need the 13th primitive Pythagorean triangle:
36,77,85
^ ^ We calculate the difference between the two small numbers: 77-36=41.
^ To get our numerator we subtract 41 from the hypotenuse length: 85-41=44.
^ ^ Then we calculate the sum of the two small numbers: 36+77=113.
^ We subtract 85 from this sum to get the denominator: 113-85=28.
This gives us the fraction 44/28 and in reduced form 11/7.
CROSSREFS
KEYWORD
frac,nonn
AUTHOR
S. Brunner, Nov 01 2019
STATUS
approved