login
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

%I #22 Feb 04 2024 18:48:15

%S 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,

%T 21,22,23,23,24,25,26,27,27,28,29,30,30,31,32,33,33,34,35,36,36,37,38,

%U 39,39,40,41,42,42,43,44,45,45,46,47,48,49,49,50,51,52

%N 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.

%C a(n) is nondecreasing; lim_{n->oo} a(n) = oo.

%C 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.

%F a(n) is either ceiling(n*Pi/(1+Pi)) or floor(n*Pi/(1+Pi)).

%F a(n) = round((2*n*Pi + n - sqrt(Pi^2 + 2*Pi + n^2 + 1))/(2*Pi + 2)). - _Jon E. Schoenfield_, Nov 17 2023

%e 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.

%Y Cf. A367194 (y-coordinate), A000796, A002485.

%K nonn,frac

%O 1,3

%A _Colin Linzer_, Nov 09 2023

%E Corrected information and made it in line with A367194.