%I #16 Nov 21 2020 17:16:36
%S 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
%T 2,2,2,2,2,2,6,19,1169,21384,520409,2559029,2922819,3228884,6972029,
%U 18244654,24601850,146539491,620041946,865572355,1298955860,3005000777,5169423076,6941400197,9965578146,26183561695,39614218376
%N Engel expansion of exp(Pi * sqrt(163)) - 262537412640768743.
%C 262537412640768743.9999999999992500... is Ramanujan's constant which is extremely close to an integer. The Engel expansion of the fractional part begins with 40 terms 2.
%H OEIS wiki: <a href="/wiki/Ramanujan%27s_constant">Ramanujan's constant</a>
%t EngelExp[ A_, n_ ] := Join[ Array[ 1 &, Floor[ A ]], First@ Transpose @ NestList[ {Ceiling[ 1/Expand[ #[[ 1 ]] #[[ 2 ]] - 1 ]], Expand[ #[[ 1 ]] #[[ 2 ]] - 1]} &, {Ceiling[ 1/(A - Floor[A]) ], A - Floor[A]}, n - 1 ]]; EngelExp[E^(Pi*Sqrt[163]) - 262537412640768743, 52]
%o (PARI) default(realprecision, 100000); r=exp(Pi*sqrt(163))-262537412640768743; for(i=1, 100, s=r*ceil(1/r)-1; print1(ceil(1/r), ", "); r=s); /* _Georg Fischer_, Nov 21 2020 */
%Y Cf. A006784, A060295.
%K nonn
%O 1,1
%A _Robert G. Wilson v_, Mar 03 2003
%E More terms from _Georg Fischer_, Nov 21 2020
|