All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 No big digits involved (Posted on 2017-11-06)
How many decimal integers below 10^20 exist having sum of their digits less than 4?

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 solution Comment 2 of 2 |
We can consider 20-digit numbers with leading zeros allowed--just lop off any leading zeros for the final result, as there's still a 1-to-1 correspondence of numbers with leading zeros and a set of numbers with leading blanks.

Now if we know what the possible combinations of non-zero digits are, we can arrange them in the various positions.

The non-zero digits could be:

1
11, 2
111, 12, 3

These are the 6 possibilities. How many placement possibilities are for each of these combinatinos?

1:   20
11:  C(20,2)= 190
2:   20
111: C(20,3)= 1140
12:  P(20,2)= 380
3:   20

20+190+20+1140+380+20 = 1770

If we count zero, we can add 1 to the total.

 Posted by Charlie on 2017-11-06 18:04:58

 Search: Search body:
Forums (0)