OFFSET
0,1
COMMENTS
LINKS
Eric Weisstein's World of Mathematics, Pierce Expansion
Wikipedia, Engel Expansion
FORMULA
Define the map g(x) 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. Then a(n) = |ceiling(1/g^n(-1/Pi))| for n >= 0.
Generalized Engel series expansion: 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) - - + +.
MAPLE
#Define the n-th iterate of the map f(x) = x/b*ceiling(b/x) - 1
map_iterate := proc(n, b, x) option remember;
if n = 0 then
x
else
-1 + 1/b*thisproc(n-1, b, x)*ceil(b/thisproc(n-1, b, x))
end if
end proc:
#Define the terms of the expansion of x to the base b
a := n -> ceil(evalf(b/map_iterate(n, b, x))):
Digits:= 500:
#Choose values for x and b
x := -1/Pi: b:= -1:
seq(abs(a(n)), n = 0..24);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Bala, Nov 27 2013
STATUS
approved