Greedy Squares

Consider the following recursive process:

a n + 1 = a n a n 2 a_{n+1}=a_n-\lfloor\sqrt{a_n}\rfloor^2

For all positive integers a 0 a_0 , the process above eventually results in a n = 0 a_n = 0 for all n k n \geq k for some positive integer k k . What is the first value of a 0 a_0 such that k = 7 ? k=7\text{?}


The answer is 7223.

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.

2 solutions

Garrett Clarke
Aug 29, 2015

It's clear that we have a 0 = k a_0=k for k = { 1 , 2 , 3 } k=\{1,2,3\} because the largest square that can be subtracted for those values is 1 1 . From there, we use the following recursive method to find the minimal a 0 a_0 for all k > 3 k>3 , where b k = a 0 b_k=a_0 for a given value of k k .

b n + 1 = b n + ( b n + 1 2 ) 2 b_{n+1} = b_n + \left(\frac{b_n+1}{2}\right)^2

Starting with b 3 = 3 b_3=3 , we get b 4 = 7 b_4=7 , b 5 = 23 b_5=23 , b 6 = 167 b_6=167 , and b 7 = 7223 b_7=\boxed{7223} .

It looks like your indices are mixed up in the solution. To be consistent with the way the problem is posed, you should have a 0 = 7223 a_0=7223 and a 7 = 0 a_7=0 . The oversight should be easy to correct.

Otto Bretscher - 5 years, 9 months ago

Log in to reply

The formula above gives the answers for a 0 a_0 for a certain value of k k . What I should really do is change the variable in the solution to b n b_n to a avoid confusion with the original problem. Thanks!

Garrett Clarke - 5 years, 9 months ago

Try this

Department 8 - 5 years, 8 months ago
Billy Sugiarto
Sep 2, 2015

Let a 0 = k 0 2 + t 1 a_{0} = k_{0}^{2} + t_{1} for k , t 1 N k, t_{1} \in N . Thus a 1 = t 1 a_{1} = t_{1} .

Now let t i = k i 2 + t i + 1 i N t_{i} = k_{i}^{2} + t_{i+1} \forall i \in N . Thus we have a k = t k k N a_{k} = t_{k} \forall k \in N .

Let a 7 = t 7 = 0 a_{7} = t_{7} = 0 , we have a 0 = k 0 2 + k 1 2 + . . . + k 6 2 a_{0} = k_{0}^{2} + k_{1}^{2} + ... + k_{6}^{2} .

Obviously k i 2 k i + 1 2 + k i + 2 2 + . . . + k 6 2 i [ 0 , 5 ] . k_{i}^{2} \geq k_{i+1}^{2} + k_{i+2}^{2} + ... + k_{6}^{2} \forall i \in [0,5].

Thus we have the smallest set of ( k 6 , k 5 , k 4 , k 3 , k 2 , k 1 , k 0 ) = ( 1 , 1 , 1 , 2 , 4 , 12 , 84 ) (k_{6}, k_{5}, k_{4}, k_{3}, k_{2}, k_{1}, k_{0} ) = (1, 1, 1, 2, 4, 12, 84) . It implies that a 0 = 7223 a_{0} = 7223 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...