I really Need a help!

For every real positive integer nn, define f(n) f(n) as the number of 11 's that appear(s) in the decimal representation of all positive integer numbers from 11 to nn. For example, f(6)=1 f(6) =1 and f(16)=9 f(16) = 9 . Prove that f(10n)=n(10n1)+1 f(10^n) = n(10^{n-1}) + 1 for all positive integer nn.

Note by Fidel Simanjuntak
2 years, 4 months ago

No vote yet
1 vote

  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:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> 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"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

Sort by:

Top Newest

There is a simple combinatorial argument for this.

Notice that f(n)=k+f(n1)f(n)=k+f(n-1) where kk is the number of 1s in nn. Now, we have only a single 1 in powers of 10, so f(10n)=f(10n1)+1f(10^n)=f(10^n-1)+1. Now, all numbers 10n1\leq 10^n-1 are at most nn digit numbers (can be thought of as nn digit numbers using non negative digits). Now, we need to count the numbers having 1 in their digits. Fixing 1 at one of the digits places is done in nn ways and the other n1n-1 digit places can be assigned a digit from 0 to 9 in 10 ways for each digit place, hence 10n110^{n-1} ways. Notice that there's no problem with excessive counting or missing out on counting a few since if a number has mm 1s, it is counted exactly once for fixing 1 at each of the mm digit places, thus it getting counted exactly mm times as desired. Now then, by the rule of product, we have f(10n1)=n10n1f(10^n-1)=n10^{n-1} and hence we conclude that,

f(10n)=n10n1+1f(10^n)=n\cdot 10^{n-1}+1

Prasun Biswas - 2 years, 4 months ago

Log in to reply

Can you give a proof for f(n)=k+f(n1) f(n) = k + f(n-1) ? I still don't get it..

Fidel Simanjuntak - 2 years, 4 months ago

Log in to reply

If f(n)f(n) is the number of 1s in the numbers from 1 to nn, then this is equivalent to the number of 1s in the numbers from 1 to n1n-1 plus the number of 1s in nn, right? Denoting by kk the number of 1s in nn, we can write f(n)=k+f(n1)f(n)=k+f(n-1).

Prasun Biswas - 2 years, 4 months ago

Log in to reply

@Prasun Biswas What do you mean, by saying "fixing" ?

Fidel Simanjuntak - 2 years, 4 months ago

Log in to reply

@Fidel Simanjuntak By "fixing", I mean specifying one of the digit places to be 1 (hence making the digit place fixed) and letting the other digit places vary.

Such "fixing" argument tend to be common in counting (enumeration) problems.

Prasun Biswas - 2 years, 4 months ago

Log in to reply

@Prasun Biswas I'm sorry for bothering you, but I still don't get this " Notice that there's no problem with excessive counting or ........". Can you help me?

Fidel Simanjuntak - 2 years, 4 months ago

Log in to reply

@Fidel Simanjuntak That part was to show that if a number has mm 1s, it is getting counting exactly mm times, no more no less. This is because we want to count the number of occurrences of 1s for that number, which is mm.

And don't worry, if you have any further problems understanding my solution, feel free to ask. I'll try my best to help you understand. After all, a solution is no good if it can't be completely understood by the reader. ;)

PS: I'm typing from my mobile, so I might be late responding to your queries, sorry for that.

Prasun Biswas - 2 years, 4 months ago

Log in to reply

What do you mean, by saying "fixing" ?

Fidel Simanjuntak - 2 years, 4 months ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...