A base ten positive integer N simultaneously satisfies the following conditions:
- N a multiple of 2020
- N has precisely 2020 base ten digits
- The base ten digits of N are a string of consecutive 1's followed by a string of consecutive 0's.
For example:111....111000....000
Determine the total number of values of N.
There is a repeating pattern with cycle length 4 regarding the sequence of the powers of 10, mod 2020.
[1,10, 100, 1000, 1920, 1020, 100, 1000, 1920, 1020, 100, ...]
Furthermore, the sum of the repeating 4: 100 + 1000 + 1920 + 1020 = 4040.
So a number formed of all 1s followed by all 0s, mod 2020, will be zero if the number of zeros is at least 2, and the number of 1s is a multiple of 4.
But the number of 1s cannot be zero since N has 2020 digits and 2020 leading zeros don't count.
So if the number of 1s is 4, 8, 12, ..., 2016 then both conditions are satisfied.
The the number of values for N is 504.
|
Posted by Larry
on 2023-06-25 09:21:11 |