A248266 Egyptian fraction representation of sqrt(40) (A010494) using a greedy function.
6, 4, 14, 320, 571786, 469930223859, 260342286471149560589985, 110737149164265654381526929767261159120340941327, 13640751783742037895965317463353502238298025074840803034014381823166601709380037834476485770683
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[ 40]]