Difference between revisions of "2007 iTest Problems/Problem 47"

(Solution)
 
Line 12: Line 12:
  
 
== Solution ==
 
== Solution ==
1447
+
First, we solve these linear recurrences. The characteristic polynomial of <math>X_n</math> is <math>x^2=x+2</math> which has roots -1 and 2. Then with the given values, <math>X_n=\lambda_1(-1)^n+\lambda_2(2)^n</math> where <math>\lambda_1</math> and <math>\lambda_2</math> are the solutions to the system
 +
<cmath>\begin{cases}
 +
1=\lambda_1+\lambda_2\\
 +
1=-\lambda_1+2\lambda_2
 +
\end{cases}</cmath>
 +
Solving, we find <math>\lambda_1=1/3</math> and <math>\lambda_2=2/3</math>, so <math>X_n=\frac{(-1)^n+2^{n+1}}{3}</math>. Similarly, <math>Y_n=\frac{3(-1)^n+2^{2n+1}}{5}</math>.
 +
 
 +
We can ignore the <math>(-1)^n</math> terms because they will be inconsequential compared to the <math>2^n</math> terms, so define <math>x_n=\frac{2^{n+1}}{3}</math> and <math>y_n=\frac{2^{2n+1}}{5}</math>. Note that for some <math>a</math> and <math>b</math>, <math>|X_a-Y_b|\le4014</math> so that we can place <math>k</math> at the average of <math>X_a</math> and <math>Y_b</math> at least. Therefore <math>X_a</math> and <math>Y_b</math> will have to be somewhat close to each other, so we examine the equation <math>X_a\approx x_a=Y_b\approx y_b</math>, or <math>\frac{2^a}{3}=\frac{2^{2b}}{5}</math>. Solving for <math>a</math> results in <math>a=2b-\log_2(5/3)</math>, and because <math>a</math> and <math>b</math> are integers, <math>a=2b-1</math>.
 +
 
 +
Using our approximations in our inequality, we find <math>|\frac{2^{2b}}{3}-\frac{2^{2b+1}}{5}|\le4014</math>, which simplifies to <math>2^{2b}\le4014\cdot15</math>. Bashing or calculator use results in <math>b<8</math>, so <math>b=7</math> and <math>a=13</math>. Note that <math>X_{13}<Y_7</math>, so the largest <math>k</math> possible will be <math>X_{13}+2007=7468</math>. The requested answer is <math>7468\text{ mod }{2007}=\boxed{1447}</math>.
 +
 
 +
~clarkculus
 +
 
 
==See Also==
 
==See Also==
 
{{iTest box|year=2007|num-b=46|num-a=48}}
 
{{iTest box|year=2007|num-b=46|num-a=48}}

Latest revision as of 11:46, 18 April 2024

Problem

Let $\{X_n\}$ and $\{Y_n\}$ be sequences defined as follows: $X_0=Y_0=X_1=Y_1=1$,

\begin{align*}X_{n+1}&=X_n+2X_{n-1}\qquad(n=1,2,3\ldots),\\ Y_{n+1}&=3Y_n+4Y_{n-1}\qquad(n=1,2,3\ldots).\end{align*}

Let $k$ be the largest integer that satisfies all of the following conditions: $|X_i-k|\leq 2007$, for some positive integer $i$; $|Y_j-k|\leq 2007$, for some positive integer $j$; and $k<10^{2007}$. Find the remainder when $k$ is divided by $2007$.

Solution

First, we solve these linear recurrences. The characteristic polynomial of $X_n$ is $x^2=x+2$ which has roots -1 and 2. Then with the given values, $X_n=\lambda_1(-1)^n+\lambda_2(2)^n$ where $\lambda_1$ and $\lambda_2$ are the solutions to the system \[\begin{cases}  1=\lambda_1+\lambda_2\\ 1=-\lambda_1+2\lambda_2 \end{cases}\] Solving, we find $\lambda_1=1/3$ and $\lambda_2=2/3$, so $X_n=\frac{(-1)^n+2^{n+1}}{3}$. Similarly, $Y_n=\frac{3(-1)^n+2^{2n+1}}{5}$.

We can ignore the $(-1)^n$ terms because they will be inconsequential compared to the $2^n$ terms, so define $x_n=\frac{2^{n+1}}{3}$ and $y_n=\frac{2^{2n+1}}{5}$. Note that for some $a$ and $b$, $|X_a-Y_b|\le4014$ so that we can place $k$ at the average of $X_a$ and $Y_b$ at least. Therefore $X_a$ and $Y_b$ will have to be somewhat close to each other, so we examine the equation $X_a\approx x_a=Y_b\approx y_b$, or $\frac{2^a}{3}=\frac{2^{2b}}{5}$. Solving for $a$ results in $a=2b-\log_2(5/3)$, and because $a$ and $b$ are integers, $a=2b-1$.

Using our approximations in our inequality, we find $|\frac{2^{2b}}{3}-\frac{2^{2b+1}}{5}|\le4014$, which simplifies to $2^{2b}\le4014\cdot15$. Bashing or calculator use results in $b<8$, so $b=7$ and $a=13$. Note that $X_{13}<Y_7$, so the largest $k$ possible will be $X_{13}+2007=7468$. The requested answer is $7468\text{ mod }{2007}=\boxed{1447}$.

~clarkculus

See Also

2007 iTest (Problems, Answer Key)
Preceded by:
Problem 46
Followed by:
Problem 48
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 TB1 TB2 TB3 TB4