A325158
Numerators of convergents to Pi using best rational approximation whose denominator is between consecutive powers of 2: [2^n, 2^(n+1)-1], where n = 0, 1, 2, ...
Original entry on oeis.org
3, 6, 22, 44, 66, 179, 355, 710, 1065, 1775, 3550, 6745, 13135, 25915, 102928, 104348, 312689, 625378, 1146408, 3126535, 5419351, 10838702, 16258053, 47627751, 80143857, 165707065, 411557987, 657408909, 1068966896, 2549491779, 6167950454, 12335900908, 21053343141, 42106686282
Offset: 0
The convergents are 3/1, 6/2, 22/7, 44/14, 66/21, 179/57, 355/113, 710/226, 1065/339, 1775/565, 3550/1130, 6745/2147, 13135/4181, 25915/8249, 102928/32763, ... = A325158/A325159.
A327360
Minimal numerator among the fractions with n-digit numerator and n-digit denominator that best approximate Pi.
Original entry on oeis.org
3, 44, 355, 3195, 99733, 833719, 5419351, 80143857, 657408909, 6167950454, 42106686282, 983339177173, 8958937768937, 94960529682104, 428224593349304, 6134899525417045, 66627445592888887, 430010946591069243, 5293386250278608690, 31760317501671652140
Offset: 1
The fractions with 2-digit numerators and 2-digit denominators that best approximate Pi are 44/14 and 88/28. The fraction with 6-digit numerator and 6-digit denominator that best approximates Pi is 833719/265381.
- 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.)
A327361 gives the corresponding denominators.
Cf.
A072398/
A072399, which gives the best rational approximation to Pi subject to a different constraint.
-
(* Given the 8th term, find the 9th term *)
(* This took twelve-plus hours to run on a laptop *)
ResultList = {};
nVal = 9;
tol = Abs[80143857/25510582 - Pi]; (* 80143857 is A327360(8), 25510582 is A327361(8) *)
Do[
CurrentNumerator = i;
Do[
CurrentDenominator = j;
CurrentQuotient = N[CurrentNumerator/CurrentDenominator];
If[
Abs[CurrentQuotient - Pi] <= tol,
ResultList = Append[ResultList, {CurrentNumerator, CurrentDenominator}]
],
{j, Floor[i/(Pi + tol)], Floor[i/(Pi - tol)] + 1}],
{i, Floor[(Pi - tol)*10^(nVal - 1)], (10^nVal - 1)}];
DifferenceList =
Table[
Abs[ResultList[[i, 1]]/ResultList[[i, 2]] - Pi],
{i, 1, Length[ResultList]}];
Extract[ResultList, Position[DifferenceList, Min[DifferenceList]]]
A327361
Minimal denominator among the fractions with n-digit numerator and n-digit denominator that best approximate Pi.
Original entry on oeis.org
1, 14, 113, 1017, 31746, 265381, 1725033, 25510582, 209259755, 1963319607, 13402974518, 313006581566, 2851718461558, 30226875395063, 136308121570117, 1952799169684491, 21208174623389167, 136876735467187340, 1684937174853026414, 10109623049118158484
Offset: 1
The fractions with 2-digit numerators and 2-digit denominators that best approximate Pi are 44/14 and 88/28.
The fraction with 6-digit numerator and 6-digit denominator that best approximates Pi is 833719/265381.
- 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.)
A327360 gives the corresponding numerators.
Cf.
A072398/
A072399, which gives the best rational approximation to Pi subject to a different constraint.
-
(* Given the 8th term, find the 9th term *)
(* This took twelve-plus hours to run on a laptop *)
ResultList = {};
nVal = 9;
tol = Abs[80143857/25510582 - Pi]; (* 80143857 is A327360(8), 25510582 is A327361(8) *)
Do[
CurrentNumerator = i;
Do[
CurrentDenominator = j;
CurrentQuotient = N[CurrentNumerator/CurrentDenominator];
If[
Abs[CurrentQuotient - Pi] <= tol,
ResultList = Append[ResultList, {CurrentNumerator, CurrentDenominator}]
],
{j, Floor[i/(Pi + tol)], Floor[i/(Pi - tol)] + 1}],
{i, Floor[(Pi - tol)*10^(nVal - 1)], (10^nVal - 1)}];
DifferenceList =
Table[
Abs[ResultList[[i, 1]]/ResultList[[i, 2]] - Pi],
{i, 1, Length[ResultList]}];
Extract[ResultList, Position[DifferenceList, Min[DifferenceList]]]
Showing 1-3 of 3 results.