Page 1 of 1

Problem 788

Posted: Wed Mar 16, 2022 4:35 pm
by PeterBurbery
Problem 788 (View Problem) has the following question:
A dominating number is a positive integer that has more than half of its digits equal.
For example, 2022 is a dominating number because three of its four digits are equal to 2. But 2021 is not a dominating number.
Let D(N) be how many dominating numbers are less than 10^N. For example, D(4)=603 and D(10)=21893256.
Find D(2022). Give your answer modulo 1000000007.
I am wondering about some edge cases.
If there is a number like 11, I think it is dominating.
I also think 131 is dominating.
I am wondering about the wording because I am getting there are only 441 dominating numbers from 1 to 10000. Are one digit numbers considered dominating?
Does there have to be more than two digits for the qualification of dominating number to be assessed because you can't have a half of one digit.

Re: Problem 788 Dominating Numbers

Posted: Wed Mar 16, 2022 5:22 pm
by PeterBurbery
I fixed my program. I have resolved the issue.

Re: Problem 788

Posted: Wed Jun 22, 2022 2:45 am
by BinarySpike
My solution was off-by-one.

I've emphasized the portion of the description that I overlooked:
A dominating number is a positive integer that has more than half of its digits equal.
For example, $2022$ is a dominating number because three of its four digits are equal to $2$. But $2021$ is not a dominating number.
Let $D(N)$ be how many dominating numbers are less than $10^N$.
For example, $D(4) = 603$ and $D(10) = 21893256$.
Find $D(2022)$. Give your answer modulo $1\,000\,000\,007$.