A248246 Egyptian fraction representation of sqrt(18) (A010474) using a greedy function.
4, 5, 24, 1027, 3219387, 102715635003972, 28595657331015533671660837004, 1215572475769570408109978391934299568566509985905302163092, 2006120697781748129559395265597556700767017998650179835542888817906954377068504244660639847221485156172682330027607
Offset: 0
Keywords
Crossrefs
Programs
-
Mathematica
Egyptian[nbr_] := Block[{lst = {IntegerPart[nbr]}, cons = N[ FractionalPart[ nbr], 2^20], denom, iter = 8}, While[ iter > 0, denom = Ceiling[ 1/cons]; AppendTo[ lst, denom]; cons -= 1/denom; iter--]; lst]; Egyptian[ Sqrt[ 18]]
Comments