+0  
 
0
269
23
avatar

How many digits of 3 are there between 1 and 10^12, and what is the percentage of these 3's out of the total of 10^12 numbers, and why? Please explain. Thank you for any help.

Guest Apr 8, 2017
Sort: 

23+0 Answers

 #1
avatar+310 
+2

For my solution, 1=000000000001, 2=000000000002 and so on (we will write every number's digits up to the 12nd digit even if that digit is 0)

 

the numbers between 1 and 1012 are all the combination of 12 digits (10 posibilities for every digit because there are 10 digits) except for the combination 000000000000 and including the 13 digits combination 1000000000000. But both of these combinations dont contain any 3, so for us they are the same. so the question is "how many 3's are there between 0 and 1012-1.

 

We have exactly 1012 combinations. Lets look at the digit in the nth place (the units digit is in the first place, the tens digit is in the second place and so on). there are exactly 1/10*(the number of combinations=1012) where that digit is 3 (because there are 1011 combinations for the other 11 digits, and if we want it to have a 3 as its digit in the n place we need to put 3 as the digit in that place) meaning there are 1011 numbers between 0 and 1012-1 that contain 3 as their digit in the n place. there are 12 places, so we repeat this 12 times (we count the times 3 appears as the first digit, then count the times 3 appears as the second digit.... and so on until the 12nd digit). So, there are 12*1011 3's between 0 and 1012-1, meaning there are 12*1011 between 1 and 1012.

Ehrlich  Apr 8, 2017
 #10
avatar
+1

Your result doesn't take into account the fact that half the matrix is set to zero:

 

     000000000000
     000000000001
     000000000034
     000000000400
     000000006868
     000000048049
     000000536107
     000007379780
     000056289484
     000869347589
     005626115408
     042828679713
     679952567873

 

So the correct result is 10^12 rows times 12 columns, divided by ten (limit to a single digit in the set {0-9}) and divided by two to account for the empty half of the matrix = 6 * 10^11 threes.

Guest Apr 9, 2017
edited by Guest  Apr 9, 2017
 #2
avatar
+1

Since we are using all the 10 digits from 0 - 9 in the number 10^12, and we are excluding one digit(3 in this case), we therefore have: 9^12 digits left. And the difference between: 10^12 - 9^12 =717,570,463,519 must be 3s. The percentage would be:717,570,463,519 / 10^12 =71.75%.

As the number n becomes larger and larger, any one digit  tends towards 1 or 100%. So, in 10^100, the digit 3 is present in 99.99% of the numbers. And this true of any of the 10 digits from 0-9.

Guest Apr 8, 2017
 #3
avatar+310 
+2

no no no. You found the number of numbers between 1 and 1012 that contain 1 or more 3's. he asked to find the number of 3's.

Ehrlich  Apr 8, 2017
 #4
avatar
+1

Ehrlich: I think the question is: How many threes are there between 1 and 10^12?. Take a simpler example: How many threes are there between 1 and 1,000. Answer=271 threes!. OR:10^3 - 9^3 =

1,000 - 729 =271 threes. The same principle applies to ALL numbers that are powers of 10. So, 10^12 is a power of 10. And the calculation is EXACTLY the same as in 10^3 or 1,000!. There should be no dispute about this, because it is very clear.

Guest Apr 8, 2017
 #5
avatar+310 
+2

But by that he meant he wants to know the number of times the digit "3" appears. Lets test MY theory, but except for the number of 3's between 1 and 1012, the number of 3's between 1 and 100. when it was between 1 and 1012 the answer was 1011*12, and between 1 and 102 the answer will be 101*2=20. You can count the 3's, the anwer will be 20 (The number of numbers containing 3 as a digit will be 102-92=19).

 

 

 

Heres another way to think about it: Every number is supposed to appear an equal number of times (if we count the zeroes after that number, the way i suggested writing the numbers in my first comment) . imagine we're counting the number of times ANY digit appears. every number has 12 digits on total, meaning our answer for the number of digits will be 12*1012. Every digit appears an equal amount of times, meaning we have to divide by 10 (the number of digits) to get 12*1011, the number of times ANY of the digits appear.

Ehrlich  Apr 8, 2017
edited by Ehrlich  Apr 8, 2017
 #6
avatar
+1

No!. Count how many threes are there between 1 and 100? The answer is 19 threes. That is what the questioner wants. Simply count the number of threes between 1 and 10^12. Very simple!.

Guest Apr 8, 2017
 #7
avatar+310 
+2

ok. Lets count together:

1

2

NUMBER OF 3's=1

4

5

.

.

.

1NUMBER OF 3's=1

.

.

2NUMBER OF 3's=1

.

.

.

30 NUMBER OF 3's=1

31 NUMBER OF 3's=1

32 NUMBER OF 3's=1

33 NUMBER OF 3's=2

34 NUMBER OF 3's=1

35 NUMBER OF 3's=1

36 NUMBER OF 3's=1

37 NUMBER OF 3's=1

38 NUMBER OF 3's=1

39 NUMBER OF 3's=1

.

.

.

4NUMBER OF 3's=1

.

.

.

5NUMBER OF 3's=1

.

.

.

6NUMBER OF 3's=1

.

.

.

7NUMBER OF 3's=1

.

.

.

8NUMBER OF 3's=1

.

.

.

93  NUMBER OF 3's=1

 

1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+2=20

Ehrlich  Apr 8, 2017
 #8
avatar
+1

The way to approach this problem is as follows:
Write each number as 12 places, as Ehrlich did, as follows:
000,000,000,001, 000,000,000,002, 000,000,000,003...and so on.
Since we have 10^12, or a trillion numbers, and each one of them consists of 12 digits, we, therefore, have a TOTAL OF: 12 x 10^12 =12 trillion INDIVIDUAL DIGITS. 
And since each of the 10 digits(0 - 9) has an equal representation in the above 12 trillion individual digits, we therefore will have:
12 trillion(or 1.2 x 10^13) digits / 10 =1.2 trillion =1.2 x 10^12 threes in 10^12 numbers. 

Guest Apr 9, 2017
 #9
avatar
+1

 

One problem. The array of numbers, 10^12 rows high and 12 digits wide, is half zeros:

 

     000000000000

     000000000001

     000000000034

     000000000400

     000000006868

     000000048049

     000000536107

     000007379780

     000056289484

     000869347589

     005626115408

     042828679713

     679952567873

 

Therefore the correct result is 1 * 10^12 (height) * 12 (width) / 10 (limit result to threes) and finally / 2 (to account for the empty half of the matrix) = 6 * 10^11

Guest Apr 9, 2017
 #12
avatar+310 
+1

Half zeroes? could you prove that? And How did you infer from that that there are 6*1011 threes? it doesnt make sense. I know alot of the digits are zeroes, but it doesnt change anything.

 

Please post your proof.

Ehrlich  Apr 10, 2017
 #18
avatar
0

In your original method, you suggested that the number matrix be filled out with leading zeros so that all the numbers have the same width. In a set of integers between 0 and 1 * 10^12, this would create a square matrix with zeros clustered at the uper left, like this:

 

    000000000000

    000000000003

    000000000014

    000000000481

    000000004067

    000000011202

    000000765025

    000006570349

    000052570231

    000569504785

    007221909937

    010323716328

    838219253314

 

This change makes it easier to understand the problem, but it doesn't change the result, which is true for a set of sequential 1 * 10^12 integers that aren't padded in this way:

 

 

                                     0

                                     6

                                   46

                                 426

                               1435

                             55123

                           230105

                         2873680

                       63725050

                     640899375

                   0060833473

                 53442421828

               372859331893

 

The point? The differing length of the integers between 0 and 1 * 10^12 needs to be taken into account. So the number of threes in the set of integers between 0 and 1 * 10^12 is 1 * 10^12 (height) times 12 (width) divided by 10 (isolate any single digit) divided by two (to account for the missing digits in the upper left of the martix as shown above).

Guest Apr 11, 2017
 #19
avatar
0

You still did not address the question of "Guest #13". That is, if this method works for the total number of 3's from 1 to 1,000, which comes to 300 threes, and from 1 to 10,000, which comes to 4,000 threes(of which there is no doubt, since both have been counted by computer programs), then why is it different for the total number of 3's from 1 to 10^12?

Guest Apr 11, 2017
 #21
avatar+310 
+1

1. The matrix is not a square matrix, its length is 1012 and its width is 12.

 

2. In my solution i HAD to count those zeroes (in the second one. In the first one i just used them to show we can look at it as a set of combinations)

 

3. You keep claimimg that the zeroes i added are exactly one half of the digits. Your calculation is wrong, because you are assuming A TON of things you think are right. I calculated it, and the number of added zeroes is less than 1/100 of all of the digits (after the zeroes were added)

Ehrlich  Apr 11, 2017
 #23
avatar
0

 

You're right -- I became enamored of my simple model and overlooked something important about the set of integers {0 , 1 * 10^12-1}, which is that (unlike my model) nearly all of of them are 12 digits long.

 

Granted its limitations, a Python model shows perfect correspondence with the idea that the total number of '3' digits in the set {0,1 * 10^12-1} is equal to 1 * 10^12 (height) * 12 (width) / 10 (isolate a single digit) = 12 * 10^11

 

A general rule can be written for any chosen upper bound m:

 

t = (log(m)/log(10)) * m / 10

 

t = number of occurrences of a single digit in the set {1,9}

 

This rule doesn't work for zero, for a reason I haven't figured out.

Guest Apr 11, 2017
edited by Guest  Apr 11, 2017
edited by Guest  Apr 11, 2017
edited by Guest  Apr 11, 2017
 #11
avatar
+1

That sounds right and thereby settles the answer to this question as: 6 x 10^11 threes  !!.

Guest Apr 9, 2017
 #13
avatar
+1

If the method used for the number of 3's between 1 and 1,000 and between 1 and 10,000 is exactly the same as between 1 and 10^12, which everybody agrees that it is 300, and 4,000 threes respectively, without dividing by 2, then what is so special about the number of 3's between 1 and 10^12????. Some rigorous explanation is needed!!!. 

Guest Apr 10, 2017
 #22
avatar+310 
0

Someone asked me to answer this, but i dont understand what you're trying to say.

 

Theres nothing "special" about this number. That was the first guest's question, and i answered it.

Ehrlich  Apr 11, 2017
 #14
avatar
+1

Alan and heureka: Do you guys have any new insights to this question??

Guest Apr 10, 2017
 #15
avatar+310 
+1

What do you NOT understand from my solution? tell me and ill explain it further

Ehrlich  Apr 10, 2017
 #17
avatar+26234 
+2

I don't have any great insights to offer!  I agree the total number of 3s is 12*10^11.  

 

There is a distinction to be made between number of individual digits that are 3s and number of integers that contain 3s. For example there are 20 individual digits that are 3s between 1 and 100, but only 19 different integers that contain 3s (because 33 counts two towards individual digits, but just one towards individual integers). The figure of 12*10^11 refers to individual digits, not individual integers.

Alan  Apr 10, 2017
 #16
avatar
+1

Your solution and mine posted as "Guest #6", which begins with:"The way to approach this problem is as follows:" are exactly the same!! So, I do agree with your solution! My beef is also with the people who are dividing by 2. I asked Alan and heureka to take a look at it and see if they have anything NEW to add. Got it?. 

Guest Apr 10, 2017
 #20
avatar+18607 
+3

How many 3s..........

 

How many digits of 3 are there between 1 and 10^12, and what is the percentage of these 3's out of the total of 10^12 numbers, and why? Please explain.

Thank you for any help.

 

I agree with Alan the total count of 3s is in general 

between 1 and 10n \(n\cdot 10^{n-1}\)

between 1 and 1012  = \(12\cdot 10^{11}\)

 

My empirical solution:

\(\small{ \begin{array}{|lcr|c|rrrrrrrrrrrrr|r|} \hline &&& n & &12th&11th&10th&9th&8th&7th&6th&5th&4th&third&second&first & \text{Sum of 3's} \\ &&& & \text{3's in Postion} \\ \hline 1 &\ldots& 10 & 1 & & & & & & & & & & & & &1\times 3 & 1\\ 1 &\ldots& 100 & 2 & & & & & & & & & & & &10\times 3 &10\times 3 & 20 \\ 1 &\ldots& 1000 & 3 & & & & & & & & & & &100\times 3&100\times 3&100\times 3 & 300 \\ 1 &\ldots& 10000 & 4 & & & & & & & & & &1000\times 3&1000\times 3&1000\times 3&1000\times 3 & 4000 \\ \cdots \\ 1 &\ldots& 1000000000000 & 12 & &100000000000\times 3&100000000000\times 3&100000000000\times 3&100000000000\times 3&100000000000\times 3&100000000000\times 3&100000000000\times 3&100000000000\times 3&100000000000\times 3&100000000000\times 3&100000000000\times 3&100000000000\times 3 & 1200000000000 \\ \hline \end{array} } \)

 

laugh

heureka  Apr 11, 2017
edited by heureka  Apr 11, 2017

22 Online Users

avatar
avatar
avatar
avatar
avatar
We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.  See details