The Engel expansion of 1/Pi is given in A014012 and the Pierce (or alternating Engel) expansion of 1/Pi is found in A006283.
We can unify the algorithms for finding the Engel and Pierce expansions of a real number as follows.
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 nth iterate of f, with the convention that f^(0)(x) = x. Let r be a real number such that 0 < r < 1.
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)) + ....
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))  ....
By working with a modification of the map f we can find two generalized Engeltype 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 nth iterate of g, with the convention that g^(0)(x) = x.
A)
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 Engeltype 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.
The series will be finite if and only if r is rational.
The present sequence is an example of this first type of generalized Engel expansion for the real number r := 1/Pi.
B)
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.
It can be shown that we now have a generalized Engeltype 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)) + +   ....
Again, the series terminates when r is rational, otherwise it is infinite.
See A232328 for the generalized Engel expansion of 1/Pi of the second kind.
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.
