Difference between revisions of "2013 USAJMO Problems/Problem 4"
Countingkg (talk | contribs) |
|||
Line 1: | Line 1: | ||
+ | ==Problem== | ||
Let <math>f(n)</math> be the number of ways to write <math>n</math> as a sum of powers of <math>2</math>, where we keep track of the order of the summation. For example, <math>f(4)=6</math> because <math>4</math> can be written as <math>4</math>, <math>2+2</math>, <math>2+1+1</math>, <math>1+2+1</math>, <math>1+1+2</math>, and <math>1+1+1+1</math>. Find the smallest <math>n</math> greater than <math>2013</math> for which <math>f(n)</math> is odd. | Let <math>f(n)</math> be the number of ways to write <math>n</math> as a sum of powers of <math>2</math>, where we keep track of the order of the summation. For example, <math>f(4)=6</math> because <math>4</math> can be written as <math>4</math>, <math>2+2</math>, <math>2+1+1</math>, <math>1+2+1</math>, <math>1+1+2</math>, and <math>1+1+1+1</math>. Find the smallest <math>n</math> greater than <math>2013</math> for which <math>f(n)</math> is odd. | ||
+ | |||
+ | ==Solution== | ||
+ | |||
+ | First of all, note that <math>f(n)</math> = <math>\sum_{1}^{k} f(n-2^{k})</math> where <math>k</math> is the largest integer such that <math>2^k \le n</math>. We let <math>f(0) = 1</math> for convenience. | ||
+ | |||
+ | From here, we proceed by induction, with our claim being that the only <math>n</math> such that <math>f(n)</math> is odd are <math>n</math> representable of the form <math>2^{a} - 1, a \in \mathbb{Z}</math> |
Revision as of 18:55, 11 May 2013
Problem
Let be the number of ways to write as a sum of powers of , where we keep track of the order of the summation. For example, because can be written as , , , , , and . Find the smallest greater than for which is odd.
Solution
First of all, note that = where is the largest integer such that . We let for convenience.
From here, we proceed by induction, with our claim being that the only such that is odd are representable of the form