← Complete problem index

PROJECT EULER · #0788

Dominating Numbers

Statement only · SolvedOriginal problem ↗

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 10N. For example, D(4)=603 and D(10)=21893256.

Find D(2022). Give your answer modulo 1000000007.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.