# What are the last four digits of a_{2012}?

#### anemone

##### MHB POTW Director
Staff member
Let $a_n$ be a sequence such that $a_1=1$ and $a_{n+1}=\left\lfloor a_n+\sqrt{a_n}+\dfrac{1}{2} \right \rfloor$.

What are the last four digits of $a_{2012}$?

#### Opalg

##### MHB Oldtimer
Staff member
Let $a_n$ be a sequence such that $a_1=1$ and $a_{n+1}=\left\lfloor a_n+\sqrt{a_n}+\dfrac{1}{2} \right \rfloor$.

What are the last four digits of $a_{2012}$?
$a_{2n} = n^2+1$. To prove that by induction, notice that $n^2+1 < \bigl(n+\frac12\bigr)^2 = n^2+n+\frac14 < n^2+n+1$. Therefore $$\sqrt{n^2+1} < n+\tfrac12 < \sqrt{n^2+n+1}.$$ It follows that $$a_{2n} + \sqrt{a_{2n}} + \tfrac12 = n^2+1 + \sqrt{n^2+1} + \tfrac12 <n^2+ \bigl(n+\tfrac12\bigr) + \tfrac12 = n^2+n+1$$ (so that $a_{2n+1} = n^2+n+1$). Then $$a_{2n+1} + \sqrt{a_{2n+1}} + \tfrac12 = (n^2+n+1) + \sqrt{n^2+n+1} + \tfrac12 > (n^2+n+1) + \bigl(n+\tfrac12\bigr) + \tfrac12 = n^2+2n+2 = (n+1)^2+1,$$ so that $a_{2n+2} = (n+1)^2+1.$ That completes the inductive step, and shows in particular that $$a_{2012} = (1006)^2 + 1 = (10^3+6)^2 = 10^6 + 12\cdot 10^3 + 36 + 1 = 10^6 + 12\cdot 10^3 + 37,$$ so that its last four digits are $1237.$

MHB Math Helper
@Opalg:

-Dan

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Nice!

But I'll pick 2037 as answer.

Staff member

#### anemone

##### MHB POTW Director
Staff member
Thanks for participating Opalg!

Your method seems so perfect to me.

My solution:

Observe that

$a_1=1$, $a_2=2$, $a_3=3$, $a_4=5$,$a_5=7$, $a_6=10$, $a_7=13$, $a_8=17$, $a_9=21$, $a_{10}=26$, $\cdots$

We are asked to find the last 4 digits of $a_{2012}$ term, so, if we only consider the terms $a_2=2$, $a_4=5$, $a_6=10$, $a_8=17$, $a_{10}=26$, $\cdots$, we see that

1.

the differences between the terms made up an arithemetic sequence (3, 5, 7, 9, ......), since

and hence we get the sum of the first $n$ terms of the sequence (3, 5, 7, 9,......) be
$S_n=\dfrac{n}{2}(2(3)+(n-1)(2))=n(n+2)$.

2. Once we recognize this pattern, we can easily find whichever term that we would like to, says, if we want to look for the 5th term in this sequence ($2,5,10,17,26,37,\cdots$), then what are we going to do to find that fifth term is by adding the first term, that is 2 to the sum of the first 4 terms of the arithmetic sequence (3, 5, 7, 9, ......), i.e.

$a_5=2+4(4+2)=26$

Therefore, if we look for the 1006th term in the sequence ($a_2=2$, $a_4=5$, $a_6=10$, $a_8=17$, $a_{10}=26$, $\cdots$), that means we are actually find the $a_{2012}$ of the given sequence in the original problem.

So, $a_{1006}=2+1005(1005+2)=1012037$, thus, the last four digits of $a_{2012}$ is 2037.

Last edited:

##### Well-known member
Thanks for participating Opalg!

Your method seems so perfect to me.

My solution:

Observe that

$a_1=1$, $a_2=2$, $a_3=3$, $a_4=5$,$a_5=7$, $a_6=10$, $a_7=13$, $a_8=17$, $a_9=21$, $a_{10}=26$, $\cdots$

We are asked to find the last 4 digits of $a_{2012}$ term, so, if we only consider the terms $a_2=2$, $a_4=5$, $a_6=10$, $a_8=17$, $a_{10}=26$, $\cdots$, we see that

1.

the differences between the terms made up an arithemetic sequence (3, 5, 7, 9, ......), since

View attachment 1659
and hence we get the sum of the first $n$ terms of the sequence (3, 5, 7, 9,......) be
$S_n=\dfrac{n}{2}(2(3)+(n-1)(2))=n(n+2)$.

2. Once we recognize this pattern, we can easily find whichever term that we would like to, says, if we want to look for the 5th term in this sequence ($2,5,10,17,26,37,\cdots$), then what are we going to do to find that fifth term is by adding the first term, that is 2 to the sum of the first 4 terms of the arithmetic sequence (3, 5, 7, 9, ......), i.e.

$a_5=2+4(4+2)=26$

Therefore, if we look for the 1006th term in the sequence ($a_2=2$, $a_4=5$, $a_6=10$, $a_8=17$, $a_{10}=26$, $\cdots$), that means we are actually find the $a_{2012}$ of the given sequence in the original problem.

So, $a_{1006}=2+1006(1006+2)=1012037$, thus, the last four digits of $a_{2012}$ is 2037.
only one word is sufficient to describe your solution

elegant

#### Albert

##### Well-known member
Thanks for participating Opalg!

Your method seems so perfect to me.

My solution:

Observe that

$a_1=1$, $a_2=2$, $a_3=3$, $a_4=5$,$a_5=7$, $a_6=10$, $a_7=13$, $a_8=17$, $a_9=21$, $a_{10}=26$, $\cdots$

We are asked to find the last 4 digits of $a_{2012}$ term, so, if we only consider the terms $a_2=2$, $a_4=5$, $a_6=10$, $a_8=17$, $a_{10}=26$, $\cdots$, we see that

1.

the differences between the terms made up an arithemetic sequence (3, 5, 7, 9, ......), since

View attachment 1659
and hence we get the sum of the first $n$ terms of the sequence (3, 5, 7, 9,......) be
$S_n=\dfrac{n}{2}(2(3)+(n-1)(2))=n(n+2)$.

2. Once we recognize this pattern, we can easily find whichever term that we would like to, says, if we want to look for the 5th term in this sequence ($2,5,10,17,26,37,\cdots$), then what are we going to do to find that fifth term is by adding the first term, that is 2 to the sum of the first 4 terms of the arithmetic sequence (3, 5, 7, 9, ......), i.e.

$a_5=2+4(4+2)=26$

Therefore, if we look for the 1006th term in the sequence ($a_2=2$, $a_4=5$, $a_6=10$, $a_8=17$, $a_{10}=26$, $\cdots$), that means we are actually find the $a_{2012}$ of the given sequence in the original problem.

So, $a_{1006}=2+1006(1006+2)=1012037$, thus, the last four digits of $a_{2012}$ is 2037.
it should be :

$a_{1006}=2+1005(1005+2)=1012037$, thus, the last four digits of $a_{2012}$ is 2037

#### anemone

##### MHB POTW Director
Staff member
it should be :

$a_{1006}=2+1005(1005+2)=1012037$, thus, the last four digits of $a_{2012}$ is 2037
Oops! You're absolutely right! I will fix my previous post and thank you so much for pointing this out, Albert!