Super Duper Powered Sum

If α \alpha and β \beta are roots to the equation x 2 x 3 = 0 x^2-x-3 = 0

What is the last three digits of α 2 999 + β 2 999 \LARGE \alpha^{2^{999}} + \beta^{2^{999}} ?


The answer is 799.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Pi Han Goh
Feb 1, 2014

We first try to evaluate α 2 n + β 2 n \alpha^{2^n} + \beta^{2^n} for small n n to determine a pattern

It's trivial by Vieta's formula that α + β = 1 , α β = 3 \alpha + \beta = 1, \alpha \beta = -3

Let a n = α 2 n + β 2 n a_n = \alpha^{2^n} + \beta^{2^n} , then a 0 = 1 a_0 = 1

a 1 = α 2 1 + β 2 1 = ( α + β ) 2 2 ( α β ) = 1 2 2 ( 3 ) = 7 a_1 = \alpha^{2^1} + \beta^{2^1} = \left ( \alpha + \beta \right )^2 - 2 (\alpha \beta ) = 1^2 - 2(-3) = 7

a 2 = α 2 2 + β 2 2 = ( α 2 + β 2 ) 2 2 ( α β ) 2 = 7 2 2 ( 3 ) 2 = 31 a_2 = \alpha^{2^2} + \beta^{2^2} = \left ( \alpha^2 + \beta^2 \right )^2 - 2 (\alpha \beta )^2 = 7^2 - 2(-3)^2 = 31

a 3 = α 2 3 + β 2 3 = ( α 4 + β 4 ) 2 2 ( α β ) 4 = 3 1 2 2 ( 3 ) 4 = 799 a_3 = \alpha^{2^3} + \beta^{2^3} = \left ( \alpha^4 + \beta^4 \right )^2 - 2 (\alpha \beta )^4 = 31^2 - 2(-3)^4 = 799

It become obvious that we have a recurrence relation a 0 = 1 , a 1 = 7 a_0 = 1, a_1 = 7 , and for n = 2 , 3 , 4 , n = 2,3,4, \ldots that a n = ( a n 1 ) 2 2 3 2 n 1 a_n = (a_{n-1})^2 - 2 \cdot 3^{2^{n-1}}

Since we're only interested in the last three digits, we find modulo 1000 \text{modulo } 1000 , that is a n = ( ( a n 1 ) 2 2 3 2 n 1 ) m o d 1000 a_n = \left ( (a_{n-1})^2 - 2 \cdot 3^{2^{n-1}} \right ) \bmod {1000}

Notice that there is a term raised to the power of another power, so we can simplify the calculation by appealing to Euler Totient Function because gcd ( 3 , 1000 ) = 1 \text{gcd}(3,1000) = 1 , thus ϕ ( 1000 ) = 1000 ( 1 1 2 ) ( 1 1 5 ) = 400 \phi(1000) = 1000(1- \frac {1}{2})(1 - \frac {1}{5}) = 400 , we augment a n a_n to

a n = ( ( a n 1 ) 2 2 3 2 n 1 m o d 400 ) m o d 1000 \large a_n = \left ( (a_{n-1})^2 - 2 \cdot 3^{2^{n-1} \bmod{400}} \right ) \bmod {1000}

By python

lookup = {0:1,1:7}
def ABC(x):
    if x not in lookup:
        fx = ((ABC(x-1))**2 - 2*(3**((2**(x-1)) % 400))) % 1000
        lookup[x]= fx
    return lookup[x]
print ABC(999)

Output

799

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...