Can you find the cube root of a positive integer using a recursively defined sequence?
In https://socratic.org/s/aJdvbsx7 I derive a method for finding square roots by use of a recursively defined sequence.
Note that the recursively defined tribonacci sequence has the property that the ratio between consecutive terms tends to the tribonacci constant, which is the real zero of #x^3-x^2-x-1# , namely #1/3 (1 + root(3)(19 - 3 sqrt(33)) + root(3)(19 + 3 sqrt(33)))# .
Can we find a method to allow the calculation of the cube root of any positive integer using a recursively defined sequence?
In https://socratic.org/s/aJdvbsx7 I derive a method for finding square roots by use of a recursively defined sequence.
Note that the recursively defined tribonacci sequence has the property that the ratio between consecutive terms tends to the tribonacci constant, which is the real zero of
Can we find a method to allow the calculation of the cube root of any positive integer using a recursively defined sequence?
2 Answers
Yes, but it's not particularly efficient.
Explanation:
Suppose you are given a positive integer
Consider the cubic polynomial with zeros:
#k+root(3)(n)# ,#" "k+omega root(3)(n)" "# and#" "k+omega^2 root(3)(n)#
where
#(x-k-root(3)(n))(x-k-omega root(3)(n))(x-k-omega^2 root(3)(n))#
#= (x-k)^3-n#
#= x^3-3kx^2+3k^2x-(k^3+n)#
So the zeros satisfy:
#x^3 = 3kx^2-3k^2x+(k^3+n)#
Define a sequence of integers recursively by:
#{ (a_0 = 0), (a_1 = 1), (a_2 = 3k), (a_(n+3) = 3ka_(n+2)-3k^2a_(n+1)+(k^3+n)a_n) :}#
Then the ratio between successive pairs of terms will tend to
Example
Note that
Our sequence definition becomes:
#{ (a_0 = 0), (a_1 = 1), (a_2 = 6), (a_(n+3) = 6a_(n+2)-12a_(n+1)+75a_n) :}#
The first few terms of the sequence are:
#0, 1, 6, 24, 147, 1044, 6300, 36297, 220482, 1359828, 8235459#
We find:
#8235459/1359828 ~~ 6.06#
So:
#root(3)(67) ~~ 6.06-2 = 4.06#
Notes
There is a problem with this method that makes it much less efficient than the corresponding method for square roots: Though the roots
Much more efficient method using two sequences...
Explanation:
Much more efficient than a single sequence method is a two sequence method using Newton's method.
Given a positive integer
#f(x) = x^3-n#
Then;
#f'(x) = 3x^2#
Given any approximation
#a_(i+1) = a_i - (f(a_i))/(f'(a_i))#
Given that we want to use integer sequences, consider
#p_(i+1)/q_(i+1) = p_i/q_i - (f(p_i/q_i))/(f'(p_i/q_i))#
#color(white)(p_(i+1)/q_(i+1)) = p_i/q_i - ((p_i/q_i)^3-n)/(3(p_i/q_i)^2)#
#color(white)(p_(i+1)/q_(i+1)) = p_i/q_i - (p_i^3-nq_i^3)/(3p_i^2q_i)#
#color(white)(p_(i+1)/q_(i+1)) = (3p_i^3)/(3p_i^2q_i) - (p_i^3-nq_i^3)/(3p_i^2q_i)#
#color(white)(p_(i+1)/q_(i+1)) = (2p_i^3+nq_i^3)/(3p_i^2q_i)#
So define:
#{ (p_(i+1) = 2p_i^3+nq_i^3), (q_(i+1) = 3p_i^2q_i) :}#
For example, to find
#{ (p_1 = 2p_0^3+nq_0^3 = 2(color(blue)(1))^3+color(blue)(2)(color(blue)(1))^3 = 2+2 = 4), (q_1 = 3p_0^2q_0 = 3(color(blue)(1))^2(color(blue)(1)) = 3) :}#
#{ (p_2 = 2p_1^3+nq_1^3 = 2(color(blue)(4))^3+color(blue)(2)(color(blue)(3))^3 = 128+54 = 182), (q_2 = 3p_1^2q_1 = 3(color(blue)(4))^2(color(blue)(3)) = 144) :}#
#{ (p_3 = 2p_2^3+nq_2^3 = 2(color(blue)(182))^3+color(blue)(2)(color(blue)(144))^3 = 12057136+5971968 = 18029104), (q_3 = 3p_2^2q_2 = 3(color(blue)(182))^2(color(blue)(144)) = 14309568) :}#
We find:
#root(3)(2) ~~ 18029104/14309568 ~~ 1.2599#
That does not seem very efficient. How about if we start with
Then:
#{ (p_1 = 2p_0^3+nq_0^3 = 2(color(blue)(5))^3+color(blue)(2)(color(blue)(4))^3 = 250+128 = 378), (q_1 = 3p_0^2q_0 = 3(color(blue)(5))^2(color(blue)(4)) = 300) :}#
#{ (p_2 = 2p_1^3+nq_1^3 = 2(color(blue)(378))^3+color(blue)(2)(color(blue)(300))^3 = 108020304+54000000 = 162020304), (q_2 = 3p_1^2q_1 = 3(color(blue)(378))^2(color(blue)(300)) = 128595600) :}#
So:
#root(3)(2) ~~ 162020304/128595600 ~~ 1.25992105#
That's much more efficient. So the accuracy of the first approximation is important.