How many $6$ digit numbers are divisible by $7$ ?
How do I calculate it ?
I know the obvious solution using arithmetic progression .I am looking for how to solve this linear modular equation:-
$1000000a+100000b+10000c+1000d+100e+10f+g= 0$($mod 7$) , where $a,b,c,d,e,f$ and $g$ are single digit numbers.
In every 7 consecutive numbers there is one that is divisible by $7$, now do you know how many 6-digit numbers there are in the first place ?
The largest 5-digit number is $99,999$ and the smallest 7-digit number is $1,000,000$
Can you finish it from here?
After the edit, your equality can be reduced to $100,00b+10,000c+1,000d+100e+10f+g \equiv 5b + 4c +6d+2e+ 3f+g \equiv 0$ (mod $7$)
(Because you want a 6-digit number which means there must be no $1000000a$)
And each of these, for example $5b$ can be equivalent to any number $0,1,2,3,4,5,6$ (mod $7$)
So what your searching for is actually the number of ways in which you can add 6 numbers to form a multiple of $7$, where each number is between $0$ and $6$, i.e. the number of ways such that $a_1+a_2+a_3+a_4+a_5+a_6 \equiv 0$ (mod $7$) where $0\le a_i \le 6$ $\forall i$.
For example, some of the ways are $1+1+1+1+1+2$, $1+1+1+1+2+1$, $2+2+4+3+3+0$, ...
Each $a_i$ represents one of the above $5b$, $4c$, $6d$, ... that is why the order is important in the examples.
So after finding the number of ways, for example lets take $1+1+1+1+1+2$, i.e. we need to have $5b\equiv 1$, $4c\equiv 1$, $6d\equiv 1$ .... (mod $7$). So $b=3$, but we have $c=2$ or $c=9$, and $d=6$, ...
I mean in each way you have counted above (such as $1+1+1+1+1+2$) you have to count more "subways" that will give you the same example (because $c=2$ and $c=9$ give you the same example).
But anyway, this takes a lot of time, so I don't actually think that this is what you're searching for, and I couldn't have any other "arithmatical" solution in mind.