OFFSET
1,6
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 always either ceiling(n/(1+Pi)) or floor(n/(1+Pi)).
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) = 1.
MAPLE
f:= proc(n) local x;
x:= floor(n/(1+Pi));
if x = 0 then return 1 fi;
if is((n-x)/x + (n-x-1)/(x+1) < 2*Pi) then x else x+1 fi
end proc:
map(f, [$1..100]); # Robert Israel, Nov 13 2023
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Colin Linzer, Nov 13 2023
STATUS
approved