A224926 Numerator of lexicographically least fraction f satisfying floor(f * 10^A055642(n)) = n.
1, 1, 1, 2, 1, 2, 3, 4, 9, 1, 1, 1, 2, 1, 2, 1, 3, 2, 4, 1, 3, 2, 3, 6, 1, 4, 3, 2, 5, 3, 5, 8, 1, 8, 5, 4, 3, 5, 9, 2, 5, 3, 7, 4, 5, 6, 8, 12, 25, 1, 14, 9, 7, 6, 5, 9, 4, 7, 13, 3, 8, 5, 7, 9, 13, 2, 19, 11, 9, 7, 5, 8, 11, 20, 3, 10, 7, 11, 19, 4, 9, 14, 5
Offset: 1
Examples
The fractions f satisfying floor(f*100)=42, are, in lexicographical order: 3/7, 6/14, 8/19, 9/21, 11/26, 12/28, 14/33, 15/35, 16/38, 17/40, 18/42, 19/45, 20/47, 21/49... Hence, a(42)=numerator(3/7)=3.
Links
- Paul Tek, Table of n, a(n) for n = 1..11000
Programs
-
PARI
a224926(n) =\ local(a=0,b=1,c,d,e=1,f=0,x=1);\ while(x<=n, x=x*10);\ while(1, c=a+e;d=b+f;\ if(c/d < n/x, a=c;b=d,\ if(c/d >= (n+1)/x, e=c;f=d,\ return(c))))
Comments