Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: unitary (Egyptian) fractions
Replies: 17   Last Post: Mar 31, 2000 6:38 AM

 Messages: [ Previous | Next ]
 Joe Ascoly Posts: 23 Registered: 12/13/04
Re: unitary (Egyptian) fractions
Posted: Mar 21, 2000 12:48 PM

I found an APL program to compute unit fraction
that found the following answer shown below
Dan Hoey wrote -------
By the way, I found that 732/733 has 2771 different seven-term
representations. The largest denominator appears in the
representation (2305193137933140 33397845 4484 45 7 3 2). The
APL ans (2346193812419340 33397845 4484 45 7 3 2)
Using PC FP good to about 15 places So largest number is only good
to 2 places. The program used comes from
a 1991 System Journal - the program is short and produces the result
with no visable delay. On the other hand it produces one result not other
ones that also are solutions.
Array language APL program FUN
[0] Z <- T FUN X
[1] * SYVESTER ALG
[2] execute (X<=T)/ '-> 0,0 reshape Z <-iota 0'
[3] Z <- Z,T FUN X- ÃÂÃÂ·Z <- ceiling ÃÂÃÂ·X
[4] * EX 1E-16 FUN 335ÃÂÃÂ·336 * YIELDS 2 3 7 48
line 1 a comment this is sylvester algorithm
line 2 set up if X is less than or equal the tolerance
set truth to 0 or 1
if false go to 0 which is function exit
if true initalize Z to a null number
since Z will be concatnated it has to have something
in it to start - namely null
line 3 execute right to left
Z gets ceiling of recipical of X
X - ÃÂÃÂ·Z
call fun recursively and Z gets Z, FUN result
comma is concatenate
Left argument to FUN is the compare tolerance
set to 1E-16
line 4 a comment example call
1 E-16 FUN 335ÃÂÃÂ·336 yeilds 2 3 7 48
which stands for 1/2 1/3 1/7 1/48

monadic divide ÃÂÃÂ· takes one over the each element in a vector
In another post I was wrong about the period of 732/733
Helmut Richter has a web site which shows that it is 61
All rational fractions are finite repeating decimals

Dan Hoey wrote in message <20000320210410.11752.00002552@ng-ci1.aol.com>...
>It took about 13 hours on a 296 Mhz Ultra. If a mips is a
>Mhz, that's almost half a mips-year. I don't how much of the
>remaining speed difference is due to the programming language/system
>and how much is due to the algorithm.
>
>By the way, I found that 732/733 has 2771 different seven-term
>representations. The largest denominator appears in the
>representation (2305193137933140 33397845 4484 45 7 3 2). The
>smallest maximum denominator appears in (26388 20524 7330 45 7 3 2).
>
>Dan Hoey <haoyuep@aol.com> Posted and e-mailed
>