A248249 Egyptian fraction representation of sqrt(21) (A010477) using a greedy function.
4, 2, 13, 177, 344766, 1649432522483, 3009384963228815398356405, 9085726642856091334926418336934724393317743509110, 200625769243543756748406312378876010708020812606355642597458369416042779347013395136132184521789202
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[ 21]]