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.
%I A327361 #51 May 01 2025 08:31:49 %S A327361 1,14,113,1017,31746,265381,1725033,25510582,209259755,1963319607, %T A327361 13402974518,313006581566,2851718461558,30226875395063, %U A327361 136308121570117,1952799169684491,21208174623389167,136876735467187340,1684937174853026414,10109623049118158484 %N A327361 Minimal denominator among the fractions with n-digit numerator and n-digit denominator that best approximate Pi. %D A327361 O. Zelenyak, Programming workshop on Turbo Pascal: Tasks, Algorithms and Solutions, Litres, 2018, page 255. (Provides first 8 terms. Also contains similar sequences for sqrt(2) and e.) %H A327361 Jon E. Schoenfield, <a href="/A327361/b327361.txt">Table of n, a(n) for n = 1..1000</a> %H A327361 O. Zelenyak, <a href="https://books.google.com/books?id=JeUJAQAAQBAJ&pg=PA255&lpg=PA255&dq=44+355+3195+99733&source=bl&ots=IFjYEQyUTl&sig=ACfU3U3B-fXt58iDehAppCK6kuNTNnI8Xw&hl=en&sa=X&ved=2ahUKEwjMlufQxbTkAhXlQ98KHddyAA0Q6AEwBXoECAkQAQ#v=onepage&q=44%20355%203195%2099733&f=false">Programming workshop on Turbo Pascal: Tasks, Algorithms and Solutions</a>, Litres, 2018, page 255. %e A327361 The fractions with 2-digit numerators and 2-digit denominators that best approximate Pi are 44/14 and 88/28. %e A327361 The fraction with 6-digit numerator and 6-digit denominator that best approximates Pi is 833719/265381. %t A327361 (* Given the 8th term, find the 9th term *) %t A327361 (* This took twelve-plus hours to run on a laptop *) %t A327361 ResultList = {}; %t A327361 nVal = 9; %t A327361 tol = Abs[80143857/25510582 - Pi]; (* 80143857 is A327360(8), 25510582 is A327361(8) *) %t A327361 Do[ %t A327361 CurrentNumerator = i; %t A327361 Do[ %t A327361 CurrentDenominator = j; %t A327361 CurrentQuotient = N[CurrentNumerator/CurrentDenominator]; %t A327361 If[ %t A327361 Abs[CurrentQuotient - Pi] <= tol, %t A327361 ResultList = Append[ResultList, {CurrentNumerator, CurrentDenominator}] %t A327361 ], %t A327361 {j, Floor[i/(Pi + tol)], Floor[i/(Pi - tol)] + 1}], %t A327361 {i, Floor[(Pi - tol)*10^(nVal - 1)], (10^nVal - 1)}]; %t A327361 DifferenceList = %t A327361 Table[ %t A327361 Abs[ResultList[[i, 1]]/ResultList[[i, 2]] - Pi], %t A327361 {i, 1, Length[ResultList]}]; %t A327361 Extract[ResultList, Position[DifferenceList, Min[DifferenceList]]] %Y A327361 A327360 gives the corresponding numerators. %Y A327361 Cf. A072398/A072399, which gives the best rational approximation to Pi subject to a different constraint. %Y A327361 Cf. A002485/A002486, A063674/A063673, A325158/A325159. %K A327361 base,frac,nonn %O A327361 1,2 %A A327361 _Jason Zimba_, Sep 03 2019 %E A327361 a(10)-a(20) from _Jon E. Schoenfield_, Mar 12 2021