# Difference between revisions of "2016 AMC 12A Problems/Problem 25"

(Created page with "==Problem 25== Problem Let k be a positive integer. Bernardo and Silvia take turns writing and erasing numbers on a blackboard as follows: Bernardo starts by writing the sma...") |
(→Problem 25) |
||

Line 1: | Line 1: | ||

− | ==Problem | + | ==Problem== |

− | + | Let <math>k</math> be a positive integer. Bernardo and Silvia take turns writing and erasing numbers on a blackboard as follows: Bernardo starts by writing the smallest perfect square with k+1 digits. Every time Bernardo writes a number, Silvia erases the last k digits of it. Bernardo then writes the next perfect square, Silvia erases the last k digits of it, and this process continues until the last two numbers that remain on the board differ by at least 2. Let f(k) be the smallest positive integer not written on the board. For example, if k = 1, then the numbers that Bernardo writes are <math>16, 25, 36, 49, 64</math>, and the numbers showing on the board after Silvia erases are 1, 2, 3, 4, and 6, and thus f(1) = 5. What is the sum of the digits of <math>f(2) + f(4)+ f(6) + \dots + f(2016)</math>? | |

− | |||

− | Let k be a positive integer. Bernardo and Silvia take turns writing and erasing numbers on a blackboard as follows: Bernardo starts by writing the smallest perfect square with k+1 digits. Every time Bernardo writes a number, Silvia erases the last k digits of it. Bernardo then writes the next perfect square, Silvia erases the last k digits of it, and this process continues until the last two numbers that remain on the board differ by at least 2. Let f(k) be the smallest positive integer not written on the board. For example, if k = 1, then the numbers that Bernardo writes are 16, 25, 36, 49, 64, and the numbers showing on the board after Silvia erases are 1, 2, 3, 4, and 6, and thus f(1) = 5. What is the sum of the digits of f(2) + f(4)+ f(6) + | ||

<math>\textbf{(A)}\ 7986\qquad\textbf{(B)}\ 8002\qquad\textbf{(C)}\ 8030\qquad\textbf{(D)}\ 8048\qquad\textbf{(E)}\ 8064</math> | <math>\textbf{(A)}\ 7986\qquad\textbf{(B)}\ 8002\qquad\textbf{(C)}\ 8030\qquad\textbf{(D)}\ 8048\qquad\textbf{(E)}\ 8064</math> | ||

− | Solution | + | ==Solution== |

− | Consider f(2). The numbers left on the blackboard will show the hundreds place at the end. In order for the hundreds place to differ by 2, the difference between two perfect squares needs to be at least 100. | + | Consider <math>f(2)</math>. The numbers left on the blackboard will show the hundreds place at the end. In order for the hundreds place to differ by 2, the difference between two perfect squares needs to be at least <math>100</math>. Calculus <math>\left(\frac{\text{d}}{\text{d}x} x^2=2x\right)</math> and a bit of thinking says this first happens at <math>x\ge 100/2 = 50</math>. The perfect squares from here go: <math>2500, 2601, 2704, 2809\dots</math>. Note that the ones and tens also make the perfect squares, <math>1^2,2^2,3^2\dots</math>. After the ones and tens make <math>100</math>, the hundreds place will go up by <math>2</math>, thus reaching our goal. Since <math>10^2=100</math>, the last perfect square to be written will be <math>\left(50+10\right)^2=60^2=3600</math>. The missing number is one less than the number of hundreds <math>(k=2)</math> of <math>3600</math>, or <math>35</math>. |

− | Now consider f(4). Instead of the difference between two squares needing to be 100, the difference must now be | + | Now consider f(4). Instead of the difference between two squares needing to be <math>100</math>, the difference must now be <math>10000</math>. This first happens at <math>x\ge 5,000</math>. After this point, similarly, <math>\sqrt{10000}=100</math> more numbers are needed to make the <math>10^4</math>th's place go up by <math>2</math>. This will take place at <math>\left(5000+100\right)^2=5100^2= 26010000</math>. Removing the last four digits (the zeros) and subtracting one yields <math>2600</math> for the skipped value. |

− | In general, each new value of f will add two digits to the "5" and one digit to the "1". This means that the last number Bernardo writes for k=6 is ( | + | In general, each new value of f will add two digits to the "<math>5</math>" and one digit to the "<math>1</math>". This means that the last number Bernardo writes for <math>k=6</math> is <math>\left(500000+1000\right)^2</math>, the last for <math>k = 8</math> will be <math>\left(50,000,000+10,000\right)^2</math>, and so on until <math>k=2016</math>. Removing the last <math>k</math> digits as Silvia does will be the same as removing <math>k/2</math> trailing zeroes on the number to be squared. This means that the last number on the board for <math>k=6</math> is <math>5001^2</math>, <math>k=8</math> is <math>50001^2</math>, and so on. So the first missing number is <math>5001^2-1</math>,<math>50001^2-1</math>, etc. The squaring will make a "<math>25</math>" with two more digits than the last number, a "<math>10</math>" with one more digit, and a "<math>1</math>". The missing number is one less than that, so the "1" will be subtracted from <math>f(k)</math>. In other words, <math>f(k) = 25\cdot 10^{k-2}+1\cdot 10^{k/2}</math>. |

Therefore: | Therefore: | ||

− | f(2) = | + | <cmath>f(2) =35 =25 +10</cmath> |

− | + | <cmath>f(4) =2600 =2500 +100</cmath> | |

− | f(4) = | + | <cmath>f(6) =251000 =250000 +1000</cmath> |

− | + | <cmath>f(8) = 25010000 = 25000000 + 10000</cmath> | |

− | f(6) = | ||

− | |||

− | f(8) = 25010000 = 25000000 + 10000 | ||

− | And so on. The sum f(2) + f(4) + f(6) + | + | And so on. The sum <math>f(2) + f(4) + f(6) +\dots + f(2016)</math> is: |

− | + | <math>2.52525252525\dots 2525\cdot 10^{2015}</math> + <math>1.11111\dots 110\cdot 10^{1008}</math>, with <math>2016</math> repetitions each of "<math>25</math>" and "<math>1</math>". | |

− | There is no carrying in this addition. Therefore each f(k) adds 2 + 5 + 1 = 8 to the sum of the digits. | + | There is no carrying in this addition. Therefore each <math>f(k)</math> adds <math>2 + 5 + 1 = 8</math> to the sum of the digits. |

− | Since 2n = 2016, n = 1008, and 8n = 8064, or | + | Since <math>2n = 2016</math>, <math>n = 1008</math>, and <math>8n = 8064</math>, or $\boxed{\textbf{(E)}\text{ 8064}}. |

## Revision as of 10:35, 4 February 2016

## Problem

Let be a positive integer. Bernardo and Silvia take turns writing and erasing numbers on a blackboard as follows: Bernardo starts by writing the smallest perfect square with k+1 digits. Every time Bernardo writes a number, Silvia erases the last k digits of it. Bernardo then writes the next perfect square, Silvia erases the last k digits of it, and this process continues until the last two numbers that remain on the board differ by at least 2. Let f(k) be the smallest positive integer not written on the board. For example, if k = 1, then the numbers that Bernardo writes are , and the numbers showing on the board after Silvia erases are 1, 2, 3, 4, and 6, and thus f(1) = 5. What is the sum of the digits of ?

## Solution

Consider . The numbers left on the blackboard will show the hundreds place at the end. In order for the hundreds place to differ by 2, the difference between two perfect squares needs to be at least . Calculus and a bit of thinking says this first happens at . The perfect squares from here go: . Note that the ones and tens also make the perfect squares, . After the ones and tens make , the hundreds place will go up by , thus reaching our goal. Since , the last perfect square to be written will be . The missing number is one less than the number of hundreds of , or .

Now consider f(4). Instead of the difference between two squares needing to be , the difference must now be . This first happens at . After this point, similarly, more numbers are needed to make the th's place go up by . This will take place at . Removing the last four digits (the zeros) and subtracting one yields for the skipped value.

In general, each new value of f will add two digits to the "" and one digit to the "". This means that the last number Bernardo writes for is , the last for will be , and so on until . Removing the last digits as Silvia does will be the same as removing trailing zeroes on the number to be squared. This means that the last number on the board for is , is , and so on. So the first missing number is ,, etc. The squaring will make a "" with two more digits than the last number, a "" with one more digit, and a "". The missing number is one less than that, so the "1" will be subtracted from . In other words, .

Therefore:

And so on. The sum is:

+ , with repetitions each of "" and "". There is no carrying in this addition. Therefore each adds to the sum of the digits. Since , , and , or $\boxed{\textbf{(E)}\text{ 8064}}.