[seqfan] Re: Converting from a decimal to the simplest fraction

Maximilian Hasler maximilian.hasler at gmail.com
Wed Sep 21 16:09:19 CEST 2011


I entered it as https://oeis.org/draft/A195603 :
Numerator of floor(Pi*10^n)/10^n

Written this way it is not much more "base"(-dependent) than the
sequence 10^n itself (which does not have the keyword "base"), but
maybe it should get this keyword,
which is sometimes considered as a bit "pejorative" since the choice
of (base) 10 is somehow "arbitrary" (or rather "anthropocentric"...)
But well, OEIS is made by 10-fingered humans (and b.t.w. no-one is
blamed for having equipped us with the arbitrary choice of 10 fingers
instead of 16 or so....)

Have a nice day,

Maximilian
PS: my PARI/gp code, a(n,c=Pi) = numerator(c*10^n\1/10^n)
can be used to calculate the corresponding sequence for any other
constant c given as optional 2nd arg:

(10:03) gp > vector(20,n,a(n-1,exp(1)))

%78 = [2, 27, 271, 1359, 13591, 67957, 2718281, 13591409, 135914091,
679570457, 6795704571, 54365636569, 2718281828459, 2718281828459,
16989261427869, 543656365691809, 6795704571147613, 271828182845904523,
543656365691809047, 27182818284590452353]

(10:04) gp > vector(20,n,a(n-1,Euler)) \\ aka gamma = 0.577...
%79 = [0, 1, 57, 577, 1443, 57721, 115443, 1443039, 28860783,
36075979, 5772156649, 5772156649, 577215664901, 1154431329803,
57721566490153, 144303916225383, 180379895281729, 28860783245076643,
28860783245076643, 2886078324507664303]

(10:04) gp > vector(20,n,a(n-1, sqrt(5)/2+1/2)) \\ Phi

%81 = [1, 8, 161, 809, 809, 161803, 1618033, 16180339, 80901699,
404508497, 16180339887, 80901699437, 1618033988749, 8090169943749,
161803398874989, 809016994374947, 4045084971874737, 40450849718747371,
25281781074217107, 8090169943749474241]

(10:04) gp > vector(20,n,a(n-1, sqrt(5)/2-1/2)) \\ 1/Phi
%82 = [0, 3, 61, 309, 309, 61803, 618033, 6180339, 30901699,
154508497, 6180339887, 30901699437, 618033988749, 3090169943749,
61803398874989, 309016994374947, 1545084971874737, 15450849718747371,
9656781074217107, 3090169943749474241]



On Wed, Sep 21, 2011 at 8:50 AM, Harvey P. Dale <hpd1 at nyu.edu> wrote:
>        This Mathematica program will generate the first nn terms of the sequence:
>
> nn=50; Numerator[With[{pidgs=N[Pi,nn]},Table[IntegerPart[pidgs 10^(n-1)]/10^n,{n,nn}]]]
>
>        Best,
>
>        Harvey
>
> -----Original Message-----
> From: seqfan-bounces at list.seqfan.eu [mailto:seqfan-bounces at list.seqfan.eu] On Behalf Of Eric Angelini
> Sent: Wednesday, September 21, 2011 6:10 AM
> To: Sequence Fanatics Discussion list
> Subject: [seqfan] Converting from a decimal to the simplest fraction
>
> Hello SeqFans,
> Playing around with Georges Brougnard's
> "Fractissimo" iPhone App I came to this
> for the constant Pi:
>
>       3 -->      3/1      -->      3
>     3.1 -->     31/10     -->     31
>    3.14 -->    157/50     -->    157
>   3.141 -->   3141/1000   -->   3141
>  3.1415 -->   6283/2000   -->   6283
>  3.14159 --> 314159/100000 --> 314159
> 3.141592 --> 392699/125000 --> 392699
> ...
>
> Would it be of interest for the OEIS
> to enter the last (numerators) column
> as a sequence?
>
> If yes, what about e, phi, Champernowne,
> etc.
>
> Best,
> É.
>
>
>
>
>
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>



More information about the SeqFan mailing list