Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | James Waldby <not@valid.invalid> |
|---|---|
| Newsgroups | sci.math |
| Subject | Re: What do these sequential fractions represent? |
| Date | 2020-07-04 04:12 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <rdovjm$es6$3@dont-email.me> (permalink) |
| References | (13 earlier) <3b0abeee-5a44-480b-ba4c-08cc98d22ec4o@googlegroups.com> <rdjs5n$es6$1@dont-email.me> <e523cee0-a847-4705-8d8e-5b21b34c0978o@googlegroups.com> <rdmf3i$es6$2@dont-email.me> <4aecfde7-3ea4-4427-ae1c-2005a3718790o@googlegroups.com> |
On Fri, 03 Jul 2020 08:29:14 -0700, djoyce099 wrote:
> On Friday, July 3, 2020 at 1:18:48 AM UTC-4, James Waldby wrote:
>> On Thu, 02 Jul 2020 14:00:48 -0700, djoyce099 wrote:
>> > On Thursday, July 2, 2020 at 1:43:25 AM UTC-4, James Waldby wrote:
>> >> On Wed, 01 Jul 2020 11:29:49 -0700, djoyce099 wrote:
>> >> ...
>> >> > Here are the first 9 fractions depicting each step of the above formula.
>> >> > 9/3, 11/4, 49/18, 87/32, 1631/600, 11743/4320, 31967/11760,
>> >> > 876809/322560, 8877691/3265920
>> >> >
>> >> > Factorial (9!) is used in determining the last fraction above.
>> >> > The next term will use factorial (10!)
>> >> > Also note all, even, odd ---numerator, denominator.
>> >> > Who can add to this list?
>> >>
>> >> On 27 June I posted python to print out terms of the series; see below.
[snipped program]
>>
>> > Having problem with -- print (f'{i-1:5} {float(s):<20.16} {s}') <-- here
>> > it highlights the last hyphen in that line }')
>> >
>> > Probably because I have an older version of Python - Python 2.6.6rel
>>
>> As Chris Thomasson noted, the program works ok with Python 3. I have
>> Python 3.6.9 installed. 3.7 might be available now. Python 2 doesn't
>> have f-strings formatting and because it was end-of-life'd last
>> January never will. <https://stackoverflow.com/a/46182112/837847>
>> mentions a workaround, or you can just replace the above print with:
>>
>> print ('{:5} {:<20.16} {}'.format(i-1, float(s), s))
> I downloaded Python 2.7.6 and used the above print line and it worked great
> because the other did not work either.
> What added code will increase the decimal expansion of (e) from the 16th term
> on?
> Do I need to import GMPY or is that now built-in?
Importing from gmpy and using its functions is one way to get indefinite
precision decimal calculations, but the decimal package might be easier
to pick up on. For example:
from fractions import Fraction
from decimal import getcontext, Decimal
getcontext().prec = 33 # change 33 & 35 to set precision
def series(k):
s = Fraction(9,3); fac = 1
for i in range(2,k):
d = Decimal(s.numerator)/Decimal(s.denominator)
print ('{:5} {:<35} {}'.format(i-1, d, s))
fac = fac*i
s = s - Fraction(1,fac*i*(i-1))
print(' e {}'.format(Decimal(1).exp()))
Then series(17) produces:
1 3 3
2 2.75 11/4
3 2.72222222222222222222222222222222 49/18
4 2.71875 87/32
5 2.71833333333333333333333333333333 1631/600
6 2.71828703703703703703703703703704 11743/4320
7 2.71828231292517006802721088435374 31967/11760
8 2.71828187003968253968253968253968 876809/322560
9 2.71828183176562806192435822065452 8877691/3265920
10 2.71828182870370370370370370370370 4697191/1728000
11 2.71828182847595726383605171483959 1193556233/439084800
12 2.71828182846014153884524254894625 2232105163/821145600
13 2.71828182845911211295826680442065 2222710781/817689600
14 2.71828182845904908688355400373541 3317652307271/1220496076800
15 2.71828182845904544537701504191804 53319412081141/19615115520000
e 2.71828182845904523536028747135266
The last 3 lines of output from series(30) are:
27 2.71828182845904523536028747135267 799173430907446007531862987961/293999475161295508340736000000
28 2.71828182845904523536028747135266 7735209504091823085246673858783/2845624549709329364680704000000
e 2.71828182845904523536028747135266
--
jiw
Back to sci.math | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 05:38 -0700
What do these sequential fractions represent? bassam karzeddin <sophyan2003@gmail.com> - 2020-06-27 06:06 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 06:21 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-06-27 09:27 -0500
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-27 17:09 +0100
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-06-27 11:36 -0500
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-06-27 08:58 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-06-27 11:49 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 10:34 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 10:38 -0700
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-06-27 20:52 +0000
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 14:25 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-06-28 21:53 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 11:57 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 12:03 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-27 20:09 +0100
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 12:26 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-27 21:07 +0100
Re: What do these sequential fractions represent? Mitch Raemsch <mitchrae3323@gmail.com> - 2020-06-27 13:11 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 13:22 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-27 21:24 +0100
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 13:30 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-27 22:12 +0100
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-27 14:39 -0700
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-06-28 06:10 +0000
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-06-28 02:17 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-28 05:14 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-28 05:21 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-06-28 16:36 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-29 09:48 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-29 17:57 +0100
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-06-28 21:56 -0500
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-06-28 13:22 +0100
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-06-28 16:34 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-06-30 16:09 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-06-30 21:30 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-01 05:42 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-01 09:39 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-01 10:20 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-01 11:29 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-01 13:57 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-01 14:29 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-01 15:27 -0700
Re: What do these sequential fractions represent? konyberg <konyberg@online.no> - 2020-07-01 15:38 -0700
Re: What do these sequential fractions represent? djoyce099 <Hlauk.H.Bogart@gmail.com> - 2020-07-01 15:58 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-02 00:25 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-02 10:29 -0500
Re: What do these sequential fractions represent? djoyce099 <Hlauk.H.Bogart@gmail.com> - 2020-07-01 15:46 -0700
Re: What do these sequential fractions represent? djoyce099 <Hlauk.H.Bogart@gmail.com> - 2020-07-01 16:17 -0700
Re: What do these sequential fractions represent? djoyce099 <Hlauk.H.Bogart@gmail.com> - 2020-07-01 16:23 -0700
Re: What do these sequential fractions represent? djoyce099 <Hlauk.H.Bogart@gmail.com> - 2020-07-01 16:26 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-02 00:21 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 14:09 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-02 10:26 -0500
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-07-02 05:43 +0000
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 14:00 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 14:06 -0700
Re: What do these sequential fractions represent? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-07-02 14:06 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-02 17:08 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 19:46 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-02 22:06 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 19:41 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 20:15 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-02 22:24 -0500
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-02 21:55 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-03 07:51 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 08:30 -0700
Re: What do these sequential fractions represent? Peter <peterxpercival@hotmail.com> - 2020-07-03 16:30 +0100
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 08:43 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-03 11:42 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 14:03 -0700
Re: What do these sequential fractions represent? Barry Schwarz <schwarzb@delq.com> - 2020-07-03 15:46 -0700
Re: What do these sequential fractions represent? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-07-03 15:53 -0700
Re: What do these sequential fractions represent? FromTheRafters <erratic@nomail.afraid.org> - 2020-07-03 19:09 -0400
Re: What do these sequential fractions represent? FromTheRafters <erratic@nomail.afraid.org> - 2020-07-03 15:22 -0400
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-07-03 05:18 +0000
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 06:14 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 08:29 -0700
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-07-04 04:12 +0000
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 21:43 -0700
Re: What do these sequential fractions represent? konyberg <konyberg@online.no> - 2020-07-03 12:29 -0700
Re: What do these sequential fractions represent? James Waldby <not@valid.invalid> - 2020-07-04 20:36 +0000
Re: What do these sequential fractions represent? konyberg <konyberg@online.no> - 2020-07-04 13:50 -0700
Re: What do these sequential fractions represent? konyberg <konyberg@online.no> - 2020-07-04 14:15 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-04 16:41 -0500
Re: What do these sequential fractions represent? konyberg <konyberg@online.no> - 2020-07-04 14:47 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-04 18:05 -0500
Re: What do these sequential fractions represent? FromTheRafters <erratic@nomail.afraid.org> - 2020-07-05 08:19 -0400
Re: What do these sequential fractions represent? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-07-04 14:52 -0700
Re: What do these sequential fractions represent? Sergio <invalid@invalid.com> - 2020-07-04 18:03 -0500
Re: What do these sequential fractions represent? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-06-28 20:55 -0700
Re: What do these sequential fractions represent? djoyce099 <hlauk.h.bogart@gmail.com> - 2020-07-03 19:04 -0700
csiph-web