cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A367194 The y-coordinate of the point where x + y = n, x and y are integers and x/y is as close as possible to Pi.

This page as a plain text file.
%I A367194 #57 Jan 25 2024 07:14:56
%S A367194 1,1,1,1,1,2,2,2,2,3,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,
%T A367194 8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,
%U A367194 14,15,15,15,15,15,16,16,16,16,17,17,17,17,18,18
%N A367194 The y-coordinate of the point where x + y = n, x and y are integers and x/y is as close as possible to Pi.
%C A367194 a(n) is nondecreasing; lim_{n->oo} a(n) = oo.
%C A367194 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 A367194 a(n) is always either ceiling(n/(1+Pi)) or floor(n/(1+Pi)).
%e A367194 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.
%p A367194 f:= proc(n) local x;
%p A367194    x:= floor(n/(1+Pi));
%p A367194    if x = 0 then return 1 fi;
%p A367194    if is((n-x)/x + (n-x-1)/(x+1) < 2*Pi) then x else x+1 fi
%p A367194 end proc:
%p A367194 map(f, [$1..100]); # _Robert Israel_, Nov 13 2023
%Y A367194 Cf. A367193 (x-coordinate), A000796, A002486.
%K A367194 nonn,frac
%O A367194 1,6
%A A367194 _Colin Linzer_, Nov 13 2023