A248271 Egyptian fraction representation of sqrt(45) (A010499) using a greedy function.
6, 2, 5, 122, 138674, 32476589259, 7827697016386517458238, 674742854143668103289252692160450020023615629, 480580099090725670530151893237450499682750267119621001128141465878491826900413350973083878
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[ 45]]
Comments