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.

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.

This page as a plain text file.
%I A364845 #10 Aug 12 2023 00:54:43
%S A364845 1,7,151,494,11511,93039,2332332,9966699
%N 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.
%C A364845 a(2) = 7 corresponds to the denominator of A068028.
%H A364845 <a href="/index/Ph#Pi314">Index entries for sequences related to the number Pi</a>
%e A364845   n              fraction    approximated value
%e A364845   -   -------------------    ------------------
%e A364845   1                     3    3
%e A364845   2                  22/7    3.1428571428571...
%e A364845   3               474/151    3.1390728476821...
%e A364845   4              1551/494    3.1396761133603...
%e A364845   5           36163/11511    3.1416036834332...
%e A364845   6          292292/93039    3.1416072829673...
%e A364845   7       7327237/2332332    3.1415926206046...
%e A364845   8      31311313/9966699    3.1415931192464...
%e A364845   ...
%t A364845 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
%Y A364845 Cf. A000796, A002113, A068028, A070252, A364844 (numerator), A364846.
%Y A364845 Cf. A355622, A355623.
%K A364845 nonn,base,frac,more
%O A364845 1,2
%A A364845 _Stefano Spezia_, Aug 10 2023