On Wed, Oct 9, 2013 at 5:33 PM, Bill Gosper <billgosper@gmail.com> wrote:
On Wed, Oct 9, 2013 at 2:44 AM, Bill Gosper <billgosper@gmail.com> wrote:
I mentioned f(nth convergent(√3)) = 1/56 (-40 + 2^(3 n/2) (13 + 12 Sqrt[2] + (-1)^n (13 - 12 Sqrt[2]))) where f is Newman's rational counter. Why didn't I say f(1 + (-2 (1 - Sqrt[3])^(-1 + n) + 2 (1 + Sqrt[3])^(-1 + n))/(-(1 - Sqrt[3])^n + (1 + Sqrt[3])^n)) ?
Or better yet, Sqrt[3] (-1 - 2/(-1 + (-2 + Sqrt[3])^n)) .
Because instead of this formula, I got the puzzling expression
In[83]:= FullSimplify[ FindSequenceFunction[Convergents[Sqrt[3], 22]]@n, n \[Element] Integers]
Out[83]= (2 Sqrt[3] (-2 - Sqrt[3])^n QPochhammer[2 - Sqrt[3], -2 + Sqrt[3], n])/ ((-1 + (-2 - Sqrt[3])^n) QPochhammer[-1, -2 + Sqrt[3], n])
(Strangely, the supposedly equivalent FullSimplify[FindSequenceFunction[Convergents[Sqrt[3], 22], n], n \[Element] Integers] simply gives up.)
[...]
Simplifying the QPochhammer expression down to the powers of surds requires
(((-5 - 3 Sqrt[3])^(1 + n) - (1 - Sqrt[3])^(1 + n)) ((-5 - 3 Sqrt[3])^ n - (1 + Sqrt[3])^n))/ (((-5 - 3 Sqrt[3])^n - (1 - Sqrt[3])^n) ((-5 - 3 Sqrt[3])^(1 + n) - (1 + Sqrt[3])^(1 + n)))
-> (1 + (-2 + Sqrt[3])^(1 + n))/(1 + (-2 + Sqrt[3])^n) (integer n).
But only if you foolishly use DiscreteRatio to poof the Pochhammers.
This seems pretty hard. NeilB did it with undetermined "coefficients": Suppose the answer is (a+b s^n)/(c+s^n). Cross multiply. Eliminate a, b, and c from the special cases n=1,2,3,4. Solve for s. Now solve for a,b,c. Cross multiply and verify for general integer n. How long before Mathematica, e.g., can do these? --rwg
Years ago, I wrote for WRI a QFunctionExpand, which they only partially installed. Again, the problem: Out[314]= (2 Sqrt[3] (-2 - Sqrt[3])^n QPochhammer[2 - Sqrt[3], -2 + Sqrt[3], n])/ ((-1 + (-2 - Sqrt[3])^n) QPochhammer[-1, -2 + Sqrt[3], n]) -> Sqrt[3] (-1 - 2/(-1 + (-2 + Sqrt[3])^n)) In[315]:= QFunctionExpand[%] Out[315]= (Sqrt[3] (-2 - Sqrt[3])^ n (1 + (-2 + Sqrt[3])^n))/(-1 + (-2 - Sqrt[3])^n) -> Sqrt[3] (-1 - 2/(-1 + (-2 + Sqrt[3])^n)) In[316]:= # -> 1/FullSimplify[1/#] &[-2 - Sqrt[3]] Out[316]= -2 - Sqrt[3] -> 1/(-2 + Sqrt[3]) In[317]:= FullSimplify[%% /. %, n \[Element] Integers] Out[317]= Sqrt[3] (-1 - 2/(-1 + (-2 + Sqrt[3])^n)) -> Sqrt[3] (-1 - 2/(-1 + (-2 + Sqrt[3])^n)) Let's hope WRI installs more of it. --rwg