login
Egyptian fraction representation of sqrt(7) (A010465) using a greedy function.
0

%I #6 Oct 20 2019 12:21:09

%S 2,2,7,346,250326,159992246122,43126926376468440463866,

%T 2067900185855597116733968004943580535040713497,

%U 14833490144163739987168640921306687956266487136609932761918465200939453258507455567518894133

%N Egyptian fraction representation of sqrt(7) (A010465) using a greedy function.

%t 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[ 7]]

%Y Egyptian fraction representations of the square roots: A006487, A224231, A248235-A248322.

%Y Egyptian fraction representations of the cube roots: A129702, A132480-A132574.

%K nonn

%O 0,1

%A _Robert G. Wilson v_, Oct 04 2014