This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A232327 #8 Feb 16 2025 08:33:20 %S A232327 3,23,27,89,137,9190,25731,80457,125859,270815,609977,959612,1034186, %T A232327 1491489,2975032,264484387,1092196976,1194228023,1424193547, %U A232327 4523998315,13583506006,380693793416,1097951708621,1486580651232 %N A232327 A generalized Engel expansion of 1/Pi. %C A232327 The Engel expansion of 1/Pi is given in A014012 and the Pierce (or alternating Engel) expansion of 1/Pi is found in A006283. %C A232327 We can unify the algorithms for finding the Engel and Pierce expansions of a real number as follows. %C A232327 Define the map f:[-1,1]\{0} -> (-1/2,1) by f(x) = x*ceiling(1/x) - 1 and let f^(n)(x) denote the n-th iterate of f, with the convention that f^(0)(x) = x. Let r be a real number such that 0 < r < 1. %C A232327 Then the sequence of positive integers e(n) := ceiling(1/f^(n)(r)) is the Engel expansion of r. The associated Engel series representation is r = 1/e(0) + 1/(e(0)*e(1)) + 1/(e(0)*e(1)*e(2)) + .... %C A232327 The sequence of positive integers p(n) := |ceiling(1/f^(n)(-r))| is the Pierce expansion of r. The associated Pierce series representation is r = 1/p(0) - 1/(p(0)*p(1)) + 1/(p(0)*p(1)*p(2)) - .... %C A232327 By working with a modification of the map f we can find two generalized Engel-type expansions for the real number r (still assuming 0 < r < 1). To this end, we define the map g:[-1,1]\{0} -> (-1/2,1) by g(x) = -x*ceiling(-1/x) - 1 and let g^(n)(x) denote the n-th iterate of g, with the convention that g^(0)(x) = x. %C A232327 A) %C A232327 Our first generalized expansion of r is the integer sequence a(n) := |ceiling(1/g^(n)(r))| for n >= 0 and until g^n(r) = 0. It can be shown that we have a generalized Engel-type representation for r by means of the (possibly infinite) series r = 1/a(0) - 1/(a(0)*a(1)) - 1/(a(0)*a(1)*a(2)) + 1/(a(0)*a(1)*a(2)*a(3)) + 1/(a(0)*a(1)*a(2)*a(3)*a(4)) - - + + ..., where the pattern of signs of the terms is as indicated. %C A232327 The series will be finite if and only if r is rational. %C A232327 The present sequence is an example of this first type of generalized Engel expansion for the real number r := 1/Pi. %C A232327 B) %C A232327 The second generalized Engel expansion of r is defined as the sequence of integers b(n) := |ceiling(1/g^(n)(-r))| for n >= 0 and until g^(n)(-r) = 0. %C A232327 It can be shown that we now have a generalized Engel-type representation for r of the form r = 1/b(0) + 1/(b(0)*b(1)) - 1/(b(0)*b(1)*b(2)) - 1/(b(0)*b(1)*b(2)*b(3)) + + - - .... %C A232327 Again, the series terminates when r is rational, otherwise it is infinite. %C A232327 See A232328 for the generalized Engel expansion of 1/Pi of the second kind. %C A232327 We can generalize the Engel and Pierce expansions of a real number even further by considering series expansions to a base b. See A232325 for a definition and details. The usual Engel and Pierce expansions occur when the base b = 1 and the two generalized Engel expansions described above arise when the base b = -1. %H A232327 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PierceExpansion.html">Pierce Expansion</a> %H A232327 Wikipedia, <a href="http://en.wikipedia.org/wiki/Engel_expansion">Engel Expansion</a> %F A232327 a(n) = ceiling(1/g^(n)(1/Pi)), where g(x) = -x*ceiling(-1/x) - 1. %F A232327 Generalized Engel series expansion: %F A232327 1/Pi = 1/3 - 1/(3*23) - 1/(3*23*27) + 1/(3*23*27*89) + 1/(3*23*27*89*137) - - + +. %e A232327 Comparison of the Engel, alternating Engel and generalized Engel series expansions for 1/Pi. %e A232327 A014012: Engel series expansion %e A232327 1/Pi = 1/4 + 1/(4*4) + 1/(4*4*11) + 1/(4*4*11*45) + 1/(4*4*11*45*70) + ... %e A232327 A006283: Alternating Engel series expansion %e A232327 1/Pi = 1/3 - 1/(3*22) + 1/(3*22*118) - 1/(3*22*118*383) + 1/(3*22*118*83*571) - ... %e A232327 A232327: Generalized Engel series expansion of the first kind %e A232327 1/Pi = 1/3 - 1/(3*23) - 1/(3*23*27) + 1/(3*23*27*89) + 1/(3*23*27*89*137) - - + + .... %e A232327 A232328: Generalized Engel series expansion of the second kind %e A232327 1/Pi = 1/4 + 1/(4*3) - 1/(4*3*6) - 1/(4*3*6*12) + 1/(4*3*6*12*51) + 1/(4*3*6*12*51*146) - - + + ... %p A232327 #A232327 %p A232327 #Define the n-th iterate of the map f(x) = x/b*ceiling(b/x) - 1 %p A232327 map_iterate := proc(n,b,x) option remember; %p A232327 if n = 0 then %p A232327 x %p A232327 else %p A232327 -1 + 1/b*thisproc(n-1,b,x)*ceil(b/thisproc(n-1,b,x)) %p A232327 end if %p A232327 end proc: %p A232327 #Define the terms of the expansion of x to the base b %p A232327 a := n -> ceil(evalf(b/map_iterate(n,b,x))): %p A232327 Digits := 500: %p A232327 #Choose values for x and b %p A232327 x := 1/Pi: b:= -1: %p A232327 seq(abs(a(n)), n = 0..25); %Y A232327 Cf. A006283, A014012, A232325, A232328. %K A232327 nonn,easy %O A232327 0,1 %A A232327 _Peter Bala_, Nov 27 2013