%I M1298 #43 Nov 17 2016 23:48:08
%S 2,4,17,19,5777,5779,192900153617,192900153619,
%T 7177905237579946589743592924684177,
%U 7177905237579946589743592924684179,369822356418414944143680173221426891716916679027557977938929258031490127514207143830378340325399155217
%N Pierce expansion of (3 - sqrt(5))/2.
%C From _Peter Bala_, Nov 22 2012: (Start)
%C For x in the open interval (0,1) define the map f(x) = 1 - x*floor(1/x). The n-th term (n >= 0) in the Pierce expansion of x is given by floor(1/f^(n)(x)), where f^(n)(x) denotes the n-th iterate of the map f, with the convention that f^(0)(x) = x.
%C Let x = (sqrt(5) - 1)/2, the reciprocal of the golden ratio, and let X = (3 - sqrt(5))/2 so that X = x^2. The Pierce expansion of X^(3^n) is [a(2*n), a(2*n+1), a(2*n+2), ...]. The Pierce expansion of x is A118242 = [1, a(0), a(1), a(2), ...]. The Pierce expansion of x^3 is [a(1), a(2), a(3), ...]. In general, the Pierce expansion of x^(3^n) for n >= 1 is [a(1)*a(3)*...*a(2*n-1), a(2*n), a(2*n+1), a(2*n+2), ...] = [sqrt(a(2*n) - 1), a(2*n), a(2*n+1), a(2*n+2), ...]. Some examples of the associated alternating series are given below.
%C (End)
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H G. C. Greubel, <a href="/A006276/b006276.txt">Table of n, a(n) for n = 0..15</a>
%H T. A. Pierce, <a href="http://www.jstor.org/stable/2299963">On an algorithm and its use in approximating roots of algebraic equations</a>, Amer. Math. Monthly, Vol. 36 No. 10, (1929) p.523-525.
%H Jeffrey Shallit, <a href="http://www.fq.math.ca/Scanned/22-4/shallit1.pdf">Some predictable Pierce expansions</a>, Fib. Quart., 22 (1984), 332-335.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PierceExpansion.html">Pierce Expansion</a>
%F Let c(0)=3, c(n+1) = c(n)^3-3*c(n) [A001999]; then this sequence is c(0)-1, c(0)+1, c(1)-1, c(1)+1, c(2)-1, c(2)+1, ......
%F a(n) = 2*F(2*3^floor(n/2)+1)-F(2*3^floor(n/2))-(-1)^n where F(k) denotes the k-th Fibonacci number A000045(k)
%F Let u(0)=(1+sqrt(5))/2 and u(n+1)=u(n)/frac(u(n)) where frac(x) is the fractional part of x, then a(n)=floor(u(n)). - _Benoit Cloitre_, Mar 09 2004
%F a(2*n) = ((3 + sqrt(5))/2)^(3^n) + ((3 - sqrt(5))/2)^(3^n) - 1.
%F a(2*n+1) = ((3 + sqrt(5))/2)^(3^n) + ((3 - sqrt(5))/2)^(3^n) + 1. - _Peter Bala_, Nov 22 2012
%e From _Peter Bala_, Nov 22 2012: (Start)
%e Let x = (sqrt(5) - 1)/2. We have the alternating series expansions
%e x = 1 - 1/2 + 1/(2*4) - 1/(2*4*17) + 1/(2*4*17*19) - ...
%e x^2 = 1/2 - 1/(2*4) + 1/(2*4*17) - 1/(2*4*17*19) + ...
%e x^6 = 1/17 - 1/(17*19) + 1/(17*19*5777) - ...
%e as well as
%e x^3 = 1/4 - 1/(4*17) + 1/(4*17*19) - 1/(4*17*19*5777) + ...
%e 4*x^9 = 1/19 - 1/(19*5777) + 1/(19*5777*5779) - ...
%e 4*19*x^27 = 1/5779 - 1/(5779*192900153617) + ....
%e (End)
%t Table[c=2*3^Floor[n/2]; 2*Fibonacci[c+1]-Fibonacci[c]-(-1)^n, {n,0,10}] (* _Harvey P. Dale_, Oct 22 2013 *)
%t PierceExp[A_, n_] := Join[Array[1 &, Floor[A]], First@Transpose@NestList[{Floor[1/Expand[1 - #[[1]] #[[2]]]], Expand[1 - #[[1]] #[[2]]]} &, {Floor[1/(A - Floor[A])], A - Floor[A]}, n - 1]]; PierceExp[N[(3 - Sqrt[5])/2, 7!], 10] (* _G. C. Greubel_, Nov 14 2016 *)
%o (PARI) r=(1+sqrt(5))/2; for(n=1,10, r=r/(r-floor(r)) print1(floor(r),","))
%Y Cf. A118242.
%K nonn,easy
%O 0,1
%A _N. J. A. Sloane_
%E More terms from _James A. Sellers_, May 19 2000