A243808 Position within the triangular array A226314(n)/A054531(n) of rationals x/y such that x < y, gcd(x,y)=1 and x+y odd.
2, 5, 7, 9, 12, 14, 16, 20, 23, 25, 27, 29, 31, 33, 35, 38, 40, 44, 46, 48, 52, 54, 57, 59, 61, 63, 65, 67, 71, 73, 77, 80, 82, 84, 86, 88, 90, 92, 94, 96, 100, 102, 104, 107, 109, 113, 119, 121, 123, 125, 127, 129, 131, 133, 135, 138, 140
Offset: 1
Keywords
Examples
. j {A226314(n),A054531(n)}, 1<=i<=j<=12 and n=i+j(j-1)/2 . -- ------------------------------------------------------------ . 1: 1,1 . 2: 1,2 2,1 . 3: 1,3 2,3 3,1 . 4: 1,4 3,2 3,4 4,1 . 5: 1,5 2,5 3,5 4,5 5,1 . 6: 1,6 4,3 5,2 5,3 5,6 6,1 . 7: 1,7 2,7 3,7 4,7 5,7 6,7 7,1 . 8: 1,8 5,4 3,8 7,2 5,8 7,4 7,8 8,1 . 9: 1,9 2,9 7,3 4,9 5,9 8,3 7,9 8,9 9,1 . 10: 1,10 6,5 3,10 7,5 9,2 8,5 7,10 9,5 9,10 10,1 . 11: 1,11 2,11 3,11 4,11 5,11 6,11 7,11 8,11 9,11 10,11 11,1 . 12: 1,12 7,6 9,4 10,3 5,12 11,2 7,12 11,3 11,4 11,6 11,12 12,1 . a(4)=9, as the 4th PPT is generated from the 9th term of the triangular array at index (3,4). This gives (x,y) as (3,4) and it generates the PPT (7,24,25). Conversely the PPT (7,24,25) gives (x,y) = (sqrt((25-7)/2), sqrt((25+7)/2)) = (3,4). It is the 9th term of the triangular array and the 4th term of the enumerating sequence.
Links
- Frank M Jackson, Table of n, a(n) for n = 1..57
- Lance Fortnow, Counting the Rationals Quickly, Computational Complexity Weblog, Monday, March 01, 2004.
- Yoram Sagher, Counting the rationals, Amer. Math. Monthly, 96 (1989), p. 823. Math. Rev. 90i:04001.
Programs
-
Mathematica
ratmap[p_, q_] := (q(q-1)/2+p); mm=20; lst={}; Do[If[OddQ[m+n]&&GCD[m, n]==1, AppendTo[lst, n/m]], {m, 1, mm}, {n, 1, m}]; Sort@Table[ratmap[Numerator[lst[[k]]], Denominator[lst[[k]]]], {k, 1, Length[lst]}]
Comments