A014012 Engel expansion of 1/Pi.
4, 4, 11, 45, 70, 1111, 4423, 5478, 49340, 94388, 200677, 308749, 708066, 711391, 1113024, 4342375, 4529119, 8061070, 12060867, 56215509, 69737317, 124001030, 214920537, 471564389, 891380746, 4293367334, 5031151602, 9832878719, 15034446439, 15481444638
Offset: 1
Keywords
Links
- Simon Plouffe, Table of n, a(n) for n = 1..973 [Terms 1 through 300 were computed by T. D. Noe]
- Index entries for sequences related to Engel expansions
Crossrefs
See A006784 for definition.
Programs
-
Maple
a(n):=proc(s) local i, j, max, aa, bb, lll, prod, S, T, kk; S := evalf(abs(s)); max := 10^(Digits - 10); prod := 1; lll := []; while prod <= max do T := 1 + trunc(1/S); S := frac(S*T); lll := [op(lll), T]; prod := prod*T end do; RETURN(lll) end; ### Enter a real number and the program will return the Engel expansion of that number, the number of terms is adjusted to the output # Simon Plouffe, Apr 23 2016
-
Mathematica
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[N[1/Pi,7! ],50] (* Vladimir Joseph Stephan Orlovsky, Jun 08 2009 *)