Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When I check the following for the Fibonacci sequence, there is no problem:

α := (1 + Sqrt[5])/2;
M := 59793;     
g[t_] := Denominator[FromContinuedFraction[ContinuedFraction[N[Log[α]/Log[5]], t]]];
δ := Log[α]/Log[5];
μ := -1/2;

Abs[Round[N[μ, 20]*g[12]] - N[μ, 20]*g[12]] - 
    M*Abs[(Round[N[δ, 20]*g[12]] - N[δ, 20]*g[12])]

Out[80]= 0.4419847132

But when I tried to adapt it to the Tribonacci sequence, it does not give the correct result.

 a := 1/3 (1 + (19 - 3 Sqrt[33])^(1/3) + (19 + 3 Sqrt[33])^(1/3))    
 a1 := (a - 1)/(4 a - 6)
 w[t_] := Denominator[FromContinuedFraction[ContinuedFraction[Log[a]/Log[5], t]]]  
 S := 12*(10^13)            
 e := Log[a1]/Log[5]   
 f := Log[a]/Log[5]

 Abs[(Round[N[e, 100]*w[33]] - N[e, 100]*w[33])] - 
 Expand[S]*Abs[(Round[N [f, 100]*w[33]] - N[f, 100]*w[33])]

Out[107]= \ -0.0011766892841599426027968279324940525950672232471234884904296672047\ 564

Theoretically, the output should be nearly 0.498. What is the problem in my code? I could not see it.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.