Egyptian Fraction

Author

Eric W. Weisstein
April 14, 2011

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Arithmetic/EgyptianFraction.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/EgyptianFraction.html.

©2011 Wolfram Research, Inc. except for portions noted otherwise

Code

Egyptian[x_,n_]:=Ceiling[1/NestList[#-1/Ceiling[1/#]&,x,n]]
Egyptian[x_]:=Ceiling[1/Most[NestWhileList[#-1/Ceiling[1/#]&,x,#!=0&]]]

Constants

cons={Catalan,E,1/E,EulerGamma,GoldenRatio,Log[2],Pi,1/Pi,Sqrt[2],(2^(-1/2)),Sqrt[3]};

TableForm[{#,Egyptian[FractionalPart[#],5]}&/@cons,TableDepth->2]

Examples

f=Flatten[Table[n/d,{d,100},{n,d-1}]];

Take[f,10]

Take[g=Egyptian/@f,10]

Plus@@@(1/Take[g,10])

Chain

NestList[Sort[Flatten[# /. a_:>{a+1,a(a+1)}]]&,{5},5]

1/%

Plus@@@%

Sum to Integers

From Robert Baillie, Aug 27, 2006

The sum of the reciprocals of the 366 numbers (below) is exactly 2. I believe this Egyptian fraction representation of 2 has the following property: If the first denominator is > 1, then the last denominator (992) is as small as possible.

Greg Martin first computed this. He’s now at University of British Columbia (gerg@math.ubc.ca). Before publishing anything, you’d better check with him about the above property.

An article about this was in Science magazine, October 10, 1997, page 224.
http://www.sciencemag.org/cgi/content/full/278/5336/224

2

http://www.math.ubc.ca/~gerg/papers/downloads/recsum2.pdf

Length[sum2={13,19,23,26,27,29,32,34,35,36,38,39,40,42,44,45,46,49,50,51,52,55,56,57,58,60,62,63,64,65,66,68,69,70,72,75,76,77,78,80,81,84,85,87,90,91,92,93,95,96,98,99,102,104,105,108,110,112,114,115,116,117,119,120,124,125,126,128,130,132,133,135,136,138,140,144,145,147,150,152,153,154,155,156,160,161,162,165,168,170,171,174,175,176,180,182,184,186,187,189,190,195,196,198,200,204,207,208,209,210,216,217,220,221,224,225,228,231,232,234,238,240,245,247,248,252,253,255,256,260,261,264,270,272,273,275,276,279,280,285,286,288,290,294,297,299,300,304,306,308,310,312,315,319,320,322,323,324,325,330,336,340,341,342,345,348,350,351,352,357,360,364,368,372,374,377,378,380,384,385,390,391,392,396,399,400,403,405,406,408,414,416,418,420,425,429,432,434,435,437,440,441,442,448,450,455,456,459,460,462,464,465,468,475,476,480,483,490,493,494,495,496,504,506,510,513,520,522,525,527,528,532,539,540,544,546,550,551,552,558,560,561,567,570,572,575,576,580,585,588,589,594,595,598,600,608,609,612,616,620,621,624,627,630,637,638,640,644,646,648,650,651,660,663,665,667,672,675,680,682,684,690,693,696,700,702,704,713,714,715,720,725,728,735,736,741,744,748,750,754,756,759,760,765,768,770,775,780,782,783,784,792,798,800,805,806,810,812,816,819,825,828,832,833,836,837,840,850,855,858,864,868,870,874,875,880,882,884,891,896,897,899,900,910,912,918,920,924,928,930,931,935,936,945,950,952,957,960,966,969,975,980,986,988,990,992}]

Total[1/sum2]

6

http://www.math.ubc.ca/~gerg/papers/downloads/recsum6.pdf

StringCases[TextRecognize[],DigitCharacter..]

Select[Union[ToExpression[%259]],1<#<1000&]

Length[sum6=Flatten[{Range[15],Range[17,23],Range[25,36],Range[38,46],Range[48,58],60,62,63,64,Range[66,70],72,73,75,76,78,80,81,82,83,84,87,Range[90,99],104,105,108,110,112,115,116,117,119,120,121,123,Range[126,132],134,136,137,140,141,Range[143,148],150,152,153,154,156,159,160,161,162,165,166,168,169,170,171,174,176,177,178,180,182,183,185,187,190,192,195,196,198,200,201,204,205,206,207,208,209,210,212,213,215,217,220,221,222,224,225,228,230,231,232,234,235,238,240,242,244,245,246,247,249,252,253,254,255,258,260,261,264,266,268,270,272,273,274,275,276,279,280,282,285,286,287,288,290,292,294,295,297,299,300,301,304,306,308,309,310,312,315,318,319,320,322,323,324,325,329,330,336,338,340,341,342,345,348,350,351,352,354,355,356,357,360,363,364,365,368,371,372,374,377,378,380,384,385,388,390,391,396,399,400,402,403,405,406,408,411,412,413,414,416,418,420,425,427,429,432,434,435,437,438,440,442,448,450,455,456,459,460,462,464,465,468,469,475,476,480,483,484,485,493,494,495,496,497,504,506,508,510,511,513,520,522,524,525,527,528,532,534,535,540,544,546,548,550,551,552,558,560,561,567,570,572,575,576,580,581,582,585,589,594,595,598,600,605,608,609,612,616,620,621,623,624,627,630,635,638,640,642,644,646,648,650,651,660,663,665,667,672,675,676,680,682,684,685,690,693,696,700,702,704,713,714,715,720,721,725,726,728,736,741,744,748,749,754,756,759,760,762,765,770,775,780,782,783,786,792,798,800,805,806,810,812,816,819,825,828,832,836,837,840,845,847,850,855,858,864,868,870,874,880,884,891,896,897,899,900,910,912,917,918,920,924,928,930,935,936,945,950,952,957,960,966,969,975,986,988,990,992}]]

Total[1/sum6]