login
A367193
The x-coordinate of the point where x + y = n, x and y are integers and x/y is as close as possible to Pi.
1
0, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 22, 23, 23, 24, 25, 26, 27, 27, 28, 29, 30, 30, 31, 32, 33, 33, 34, 35, 36, 36, 37, 38, 39, 39, 40, 41, 42, 42, 43, 44, 45, 45, 46, 47, 48, 49, 49, 50, 51, 52
OFFSET
1,3
COMMENTS
a(n) is nondecreasing; lim_{n->oo} a(n) = oo.
Swapping the x and y coordinate of the sequence does not yield the sequence defined as the point where x + y = n, x and y are integers and x/y is as close as possible to 1/Pi even when excluding terms that would lead to a division by 0.
FORMULA
a(n) is either ceiling(n*Pi/(1+Pi)) or floor(n*Pi/(1+Pi)).
a(n) = round((2*n*Pi + n - sqrt(Pi^2 + 2*Pi + n^2 + 1))/(2*Pi + 2)). - Jon E. Schoenfield, Nov 17 2023
EXAMPLE
For n = 3, the possible fractions are (0,3), (1,2), (2,1) as any negative values would would be further from Pi than 0/3. The closest fraction to Pi out of these is 2/1 so a(3) = 2.
CROSSREFS
Cf. A367194 (y-coordinate), A000796, A002485.
Sequence in context: A195180 A069210 A195172 * A277425 A245335 A244230
KEYWORD
nonn,frac
AUTHOR
Colin Linzer, Nov 09 2023
EXTENSIONS
Corrected information and made it in line with A367194.
STATUS
approved