[go: up one dir, main page]

login
A368620
a(n) is the n-digit numerator of the fraction h/k with h and k coprime positive integers at which abs(h/k-e) is minimal.
5
3, 87, 878, 2721, 49171, 566827, 9242691, 28245729, 848456353
OFFSET
1,1
COMMENTS
a(3) = 878 corresponds to the numerator of A368617.
EXAMPLE
n fraction approximated value
- ------------------- ------------------
1 3/1 3
2 87/32 2.71875
3 878/323 2.7182662538699...
4 2721/1001 2.7182817182817...
5 49171/18089 2.7182818287356...
6 566827/208524 2.7182818284705...
7 9242691/3400196 2.7182818284593...
8 28245729/10391023 2.7182818284590...
...
MATHEMATICA
a[1]=3; 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; hmin = i]]]; hmin]; Array[a, 9]
CROSSREFS
Cf. A001113, A368617, A368621 (denominator), A368659.
Sequence in context: A159053 A172494 A279131 * A230670 A232069 A172723
KEYWORD
nonn,base,frac,more
AUTHOR
Stefano Spezia, Jan 01 2024
STATUS
approved