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.

A224926 Numerator of lexicographically least fraction f satisfying floor(f * 10^A055642(n)) = n.

This page as a plain text file.
%I A224926 #9 Apr 17 2016 04:41:21
%S A224926 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,
%T A224926 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,
%U A224926 19,11,9,7,5,8,11,20,3,10,7,11,19,4,9,14,5
%N A224926 Numerator of lexicographically least fraction f satisfying floor(f * 10^A055642(n)) = n.
%C A224926 1 <= a(n) <= n.
%C A224926 For any reduced fraction u/v in the interval [1/10..1[, a(floor(u/v*10^k))=u for k sufficiently large.
%H A224926 Paul Tek, <a href="/A224926/b224926.txt">Table of n, a(n) for n = 1..11000</a>
%e A224926 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...
%e A224926 Hence, a(42)=numerator(3/7)=3.
%o A224926 (PARI) a224926(n) =\
%o A224926 local(a=0,b=1,c,d,e=1,f=0,x=1);\
%o A224926 while(x<=n, x=x*10);\
%o A224926 while(1, c=a+e;d=b+f;\
%o A224926 if(c/d < n/x, a=c;b=d,\
%o A224926 if(c/d >= (n+1)/x, e=c;f=d,\
%o A224926 return(c))))
%Y A224926 Cf. A224927 (denominators), A055642, A002487.
%K A224926 nonn,base,frac
%O A224926 1,4
%A A224926 _Paul Tek_, Apr 20 2013