[math-fun] Sometimes Simplify doesn't do much.
https://cs.uwaterloo.ca/~shallit/Papers/scf.ps (Much more: *https://tinyurl.com/y4kg4ng6 <https://tinyurl.com/y4kg4ng6>)* In[303]:= nxt[cf_] := Join[Drop[cf, -1], {cf[[-1]] + 1, cf[[-1]] - 1}, Reverse[cf[[2 ;; -2]]]] In[308]:= NestList[nxt, {0, u - 1, u + 1}, 4] // Column Out[308]= {0,-1+u,1+u} {0,-1+u,2+u,u,-1+u} {0,-1+u,2+u,u,u,-2+u,u,2+u,-1+u} {0,-1+u,2+u,u,u,-2+u,u,2+u,u,-2+u,2+u,u,-2+u,u,u,2+u,-1+u} {0,-1+u,2+u,u,u,-2+u,u,2+u,u,-2+u,2+u,u,-2+u,u,u,2+u,u,-2+u,2+u,u,u,-2+u,u,2+u,-2+u,u,2+u,u,-2+u,u,u,2+u,-1+u} In[312]:= Length /@ %308[[1]] Out[312]= {3, 5, 9, 17, 33} In[335]:= FromContinuedFraction@%308[[1, -1]] Out[335] CENSORED In[336]:= Simplify@% Out[336]= 1/u^32 + 1/u^16 + 1/u^8 + 1/u^4 + 1/u^2 + 1/u In[337]:= ByteCount@%% Out[337]= 931361224 A gigabyte! Note: Subtracting out u from %308 approaches a balanced ternary transcendental from which the continued fraction(u) is easily reconstructed. A090678 <http://oeis.org/A090678> —rwg
participants (1)
-
Bill Gosper