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.

A368621 a(n) is the n-digit denominator of the fraction h/k with h and k coprime positive integers at which abs(h/k-e) is minimal.

This page as a plain text file.
%I A368621 #20 Jan 12 2024 22:22:26
%S A368621 1,32,323,1001,18089,208524,3400196,10391023,312129649
%N A368621 a(n) is the n-digit denominator of the fraction h/k with h and k coprime positive integers at which abs(h/k-e) is minimal.
%C A368621 a(3) = 323 corresponds to the denominator of A368617.
%H A368621 <a href="/index/Ea">Index entries for sequences related to the number e</a>
%e A368621   n              fraction    approximated value
%e A368621   -   -------------------    ------------------
%e A368621   1                   3/1    3
%e A368621   2                 87/32    2.71875
%e A368621   3               878/323    2.7182662538699...
%e A368621   4             2721/1001    2.7182817182817...
%e A368621   5           49171/18089    2.7182818287356...
%e A368621   6         566827/208524    2.7182818284705...
%e A368621   7       9242691/3400196    2.7182818284593...
%e A368621   8     28245729/10391023    2.7182818284590...
%e A368621   ...
%t A368621 a[1]=1; a[n_]:=Module[{minim=Infinity},For[i = 10^(n - 1), i <= 10^n - 1, i++, For[j = Floor[i/E], j <= Ceiling[i/E], j++, If[(dist = Abs[i/j - E]) < minim && GCD[i, j] == 1, minim = dist; kmin = j]]]; kmin]; Array[a,9]
%Y A368621 Cf. A001113, A368617, A368620 (numerator), A368659.
%Y A368621 Cf. A007676, A007677, A368618, A368619.
%K A368621 nonn,base,frac,more
%O A368621 1,2
%A A368621 _Stefano Spezia_, Jan 01 2024