All rational numbers can be put into a 1-to-1 matching with the integers. For the positive of each, the below table shows a 1-to-1 matching where the rationals are laid out in order of the total of the numerator and denominator of the number expressed as a fraction in simplest (reduced) form. Within one total of numerator and denominator, they are in order of the numerator.
1 1 1/14 64
1/2 2 2/13 65
2 3 4/11 66
1/3 4 7/8 67
3 5 8/7 68
1/4 6 11/4 69
2/3 7 13/2 70
3/2 8 14 71
4 9 1/15 72
1/5 10 3/13 73
5 11 5/11 74
1/6 12 7/9 75
2/5 13 9/7 76
3/4 14 11/5 77
4/3 15 13/3 78
5/2 16 15 79
6 17 1/16 80
1/7 18 2/15 81
3/5 19 3/14 82
5/3 20 4/13 83
7 21 5/12 84
1/8 22 6/11 85
2/7 23 7/10 86
4/5 24 8/9 87
5/4 25 9/8 88
7/2 26 10/7 89
8 27 11/6 90
1/9 28 12/5 91
3/7 29 13/4 92
7/3 30 14/3 93
9 31 15/2 94
1/10 32 16 95
2/9 33 1/17 96
3/8 34 5/13 97
4/7 35 7/11 98
5/6 36 11/7 99
6/5 37 13/5 100
7/4 38 17 101
8/3 39 1/18 102
9/2 40 2/17 103
10 41 3/16 104
1/11 42 4/15 105
5/7 43 5/14 106
7/5 44 6/13 107
11 45 7/12 108
1/12 46 8/11 109
2/11 47 9/10 110
3/10 48 10/9 111
4/9 49 11/8 112
5/8 50 12/7 113
6/7 51 13/6 114
7/6 52 14/5 115
8/5 53 15/4 116
9/4 54 16/3 117
10/3 55 17/2 118
11/2 56 18 119
12 57 1/19 120
1/13 58 3/17 121
3/11 59 7/13 122
5/9 60 9/11 123
9/5 61 11/9 124
11/3 62 13/7 125
13 63 17/3 126
19 127
Using this scheme, what rational number is matched to the integer 1 million?
When 1 million is considered as a rational number, to what integer is it matched?
Good thing I can get a good estimate with ZERO programming, just with a little help from the OEIS.
Take a look at the indices of the integers in the list, that forms the sequence 1,3,5,9,11,17,21,27,31.... This is OEIS sequence
A015614.
Included on that page is a very useful asymptotic formula: a(n) ~= 3*n^2/pi^2.
A quick check: a(100)=3043 and the formula suggests a(100)~=3039.6, so pretty good with about 0.1% underestimate error at just n=100, and this will get closer as n gets larger.
So a(1,000,000) ~= 303,963,550,927. This is likely a small underestimate so I can at least say for the second question that 1 million will be matched to an integer in the neighborhood of 304 billion.
So lets go the other way for the first question. Then 1000000~=3n^2/pi^2 makes n~=551.3289. Solidly within the range of fractions whose numerator and denominator sum to 552