Suppose f is a function such that f:Z+→Z+ f:\mathbb{Z} ^+\to \mathbb{Z} ^+ f:Z+→Z+ satisfying
f(1)=1,f(2n)=f(n)f(1)=1, f(2n)=f(n)f(1)=1,f(2n)=f(n) and f(2n+1)=f(2n)+1f(2n+1)=f(2n)+1f(2n+1)=f(2n)+1,
for all positive integers nnn.
Find the maximum of f(n)f(n)f(n) when 1≤n≤2013 1 \leq n \leq 20131≤n≤2013.
Note by Mharfe Micaroz 7 years, 7 months ago
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
_italics_
**bold**
__bold__
- bulleted- list
1. numbered2. list
paragraph 1paragraph 2
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
This is a quote
# I indented these lines # 4 spaces, and now they show # up as a code block. print "hello world"
\(
\)
\[
\]
2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
f(n)f(n)f(n) is the number of 111s in the binary expansion of nnn. Since 211=20482^{11} = 2048211=2048, the smallest integer nnn with f(n)=11f(n) = 11f(n)=11 is 204720472047. Since f(1983)=10f(1983) = 10f(1983)=10, the maximum of f(n)f(n)f(n) over 1≤n≤20131 \le n \le 20131≤n≤2013 is 101010.
Log in to reply
This function doubtlessly suffices the condition, & the solution is beautiful. But is this definition of f(n)f(n)f(n) unique? Why?
Each number can be constructed, according to its binary expansion, by applying these rules.
We start with f(1), or "1" in binary. The f(2n) equation will tell us what f provides when we append 0 to our input, that is, f(10), and f(2n+1) tells us what happens when we append a 1.
e.g. f(110101) is computed by f(1) --> f(11) --> f(110) --> f(1101) --> f(11010) --> f(110101).
(all numbers in binary)
Prove it by (strong) induction on nnn.
Please help me solve my problem above!
Beat me to it... although it has been some time since it was posted.
But, yes, although it would have sufficed simply to use 210−12^{10}-1210−1 (since there cannot be any more 111s, as this number would then be 211−12^{11}-1211−1).
The argument for the sum of the digits of the binary expansion can be seen by simple construction (this is just a quick, non-rigorous sketch) of a two-case inductive proof:
Allow the number nnn to be of the form n=ak2k−1+ak−12k−2+⋯+a1n=a_k2^{k-1}+a_{k-1}2^{k-2}+\cdots+a_1n=ak2k−1+ak−12k−2+⋯+a1, where ai∈{0,1}a_i\in\{0,1\}ai∈{0,1} and ak=1a_k=1ak=1.
Case 1
Then, if this number is odd, we must have a1=1a_1=1a1=1, hence, we have f(2m+1)=f(2m)+1f(2m+1)=f(2m)+1f(2m+1)=f(2m)+1 for some m∈Zm\in\mathbb{Z}m∈Z. So, now our number becomes: 2m+1=ak2k−1+ak−12k−2+⋯+a221+1 2m+1=a_k2^{k-1}+a_{k-1}2^{k-2}+\cdots+a_22^{1}+1 2m+1=ak2k−1+ak−12k−2+⋯+a221+1 m=ak2k−2+ak−12k−3+⋯+a2 m=a_k2^{k-2}+a_{k-1}2^{k-3}+\cdots+a_2 m=ak2k−2+ak−12k−3+⋯+a2 This adds unity to our count, removes the last digit, and continues the process until the only value left of mmm is one.
Case 2
Say that nnn is even, then we must have a1=0a_1=0a1=0. Clearly, then, we have: f(2m)=f(m)f(2m)=f(m)f(2m)=f(m), which, after dividing, gives us a new number with the last digit removed and adds nothing to the count (as the last digit is 0 in base 2).
The same process applies.
Hence, we are done (note that this proof can easily be extended for uniqueness of definition as Paramjit S.'s request).
Hopefully this makes the case a little more clear for those in doubt.
a very good thing indeed.good work Mark H.
Hi there! Seeing that I am having trouble with starting a discussion, I decided to just post it as a comment instead.
While preparing for the South African National Olympiad, the following problem featured in my training material:
"An 11 sided polygon has its vertices on a circle. How many triangles can be formed using three vertices of the polygon but sharing no side with a side of the polygon?"
Can somebody please provide a solution?
Thanks!
1009!
Sorry, it's not 1009 factorial. :) Lol Careful with the !
Is it 11?
Problem Loading...
Note Loading...
Set Loading...
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
f(n) is the number of 1s in the binary expansion of n. Since 211=2048, the smallest integer n with f(n)=11 is 2047. Since f(1983)=10, the maximum of f(n) over 1≤n≤2013 is 10.
Log in to reply
This function doubtlessly suffices the condition, & the solution is beautiful. But is this definition of f(n) unique? Why?
Log in to reply
Each number can be constructed, according to its binary expansion, by applying these rules.
We start with f(1), or "1" in binary. The f(2n) equation will tell us what f provides when we append 0 to our input, that is, f(10), and f(2n+1) tells us what happens when we append a 1.
e.g. f(110101) is computed by f(1) --> f(11) --> f(110) --> f(1101) --> f(11010) --> f(110101).
(all numbers in binary)
Prove it by (strong) induction on n.
Please help me solve my problem above!
Beat me to it... although it has been some time since it was posted.
But, yes, although it would have sufficed simply to use 210−1 (since there cannot be any more 1s, as this number would then be 211−1).
The argument for the sum of the digits of the binary expansion can be seen by simple construction (this is just a quick, non-rigorous sketch) of a two-case inductive proof:
Allow the number n to be of the form n=ak2k−1+ak−12k−2+⋯+a1, where ai∈{0,1} and ak=1.
Case 1
Then, if this number is odd, we must have a1=1, hence, we have f(2m+1)=f(2m)+1 for some m∈Z. So, now our number becomes: 2m+1=ak2k−1+ak−12k−2+⋯+a221+1 m=ak2k−2+ak−12k−3+⋯+a2 This adds unity to our count, removes the last digit, and continues the process until the only value left of m is one.
Case 2
Say that n is even, then we must have a1=0. Clearly, then, we have: f(2m)=f(m), which, after dividing, gives us a new number with the last digit removed and adds nothing to the count (as the last digit is 0 in base 2).
The same process applies.
Hence, we are done (note that this proof can easily be extended for uniqueness of definition as Paramjit S.'s request).
Hopefully this makes the case a little more clear for those in doubt.
a very good thing indeed.good work Mark H.
Hi there! Seeing that I am having trouble with starting a discussion, I decided to just post it as a comment instead.
While preparing for the South African National Olympiad, the following problem featured in my training material:
"An 11 sided polygon has its vertices on a circle. How many triangles can be formed using three vertices of the polygon but sharing no side with a side of the polygon?"
Can somebody please provide a solution?
Thanks!
1009!
Log in to reply
Sorry, it's not 1009 factorial. :) Lol Careful with the !
Is it 11?