A364846
a(n) is the number of correct decimal digits of Pi obtained from the fraction A364844(n)/A364845(n).
Original entry on oeis.org
1, 3, 2, 2, 4, 4, 8, 6
Offset: 1
a(7) = 8 since A364844(7)/A364845(7) = 7327237/2332332 = 3.1415926206046... matches the first 8 digits of Pi: 3.1415926535897...
A368618
a(n) is the n-digit numerator of the fraction h/k with h and k coprime palindrome positive integers at which abs(h/k-e) is minimal.
Original entry on oeis.org
3, 11, 878, 2552, 38983, 167761, 4407044, 24988942, 882646288, 1385885831, 83034443038, 161356653161, 9051164611509, 24911822811942
Offset: 1
n fraction approximated value
- ------------------- ------------------
1 3/1 3
2 11/4 2.75
3 878/323 2.7182662538699...
4 2552/939 2.7177848775292...
5 38983/14341 2.7182902168607...
6 167761/61716 2.7182740294251...
7 4407044/1621261 2.7182816338640...
8 24988942/9192919 2.7182815382143...
9 882646288/324707423 2.7182818299783...
...
-
a[1]=3; a[n_]:=Module[{minim = Infinity}, h = Select[Range[10^(n - 1), 10^n - 1], PalindromeQ]; lh = Length[h]; For[i = 1, i <= lh, i++, k = Select[Range[Floor[Part[h, i]/E], Ceiling[Part[h, i]/E]], PalindromeQ]; lk = Length[k]; For[j = 1, j <= lk, j++, If[(dist = Abs[Part[h, i]/Part[k, j] - E]) < minim && GCD[Part[h, i], Part[k, j]] == 1, minim = dist; hmin = Part[h, i]]]]; hmin]; Array[a,9]
-
\\ See PARI program in Links
A364845
a(n) is the denominator of the fraction h/k with h and k coprime palindrome positive integers at which abs(h/k-Pi) is minimal, with the numerator h of n digits.
Original entry on oeis.org
1, 7, 151, 494, 11511, 93039, 2332332, 9966699
Offset: 1
n fraction approximated value
- ------------------- ------------------
1 3 3
2 22/7 3.1428571428571...
3 474/151 3.1390728476821...
4 1551/494 3.1396761133603...
5 36163/11511 3.1416036834332...
6 292292/93039 3.1416072829673...
7 7327237/2332332 3.1415926206046...
8 31311313/9966699 3.1415931192464...
...
-
nmax = 8; a = {1}; hmin = kmin = 0; For[n = 2, n <= nmax, n++, minim = Infinity; h = Select[Range[10^(n - 1), 10^n - 1], PalindromeQ]; k = Select[Range[10^(n - 2), 10^n - 1], PalindromeQ]; lh = Length[h]; lk = Length[k]; For[i = 1, i <= lh, i++, For[j = 1, j <= lk, j++, If[(dist = Abs[Part[h, i]/Part[k, j] - Pi]) < minim && GCD[Part[h, i], Part[k, j]] == 1, minim = dist; kmin = Part[k, j]]]]; AppendTo[a, kmin]]; a
A380099
a(n) is the n-digit numerator of the fraction h/k with h and k coprime positive integers at which abs((h/k)^4-Pi) is minimal.
Original entry on oeis.org
4, 97, 888, 9551, 13549, 505311, 4601995, 87956765, 298132602
Offset: 1
n (h/k)^4 approximated value
- ------------------- ------------------
1 (4/3)^4 3.1604938271604...
2 (97/73)^4 3.1174212867620...
3 (888/667)^4 3.1415829223858...
4 (9551/7174)^4 3.1415927852873...
5 (13549/10177)^4 3.1415926560044...
...
-
nmax = 3; a = {}; hmin = kmin = 0; For[n = 1, n <= nmax, n++, minim = Infinity; For[h = 10^(n-1), h <10^n, h++, For[k = 1, k < 10^n/Pi^(1/4), k++, If[(dist = Abs[h^4/k^4-Pi]) < minim && GCD[h,k]==1, minim = dist; hmin=h; kmin = k]]]; AppendTo[a, hmin]]; a
Showing 1-4 of 4 results.
Comments