How many 6-digit numbers are divisible by 7? 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.
 A: 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.
A: The first divisible number is $100002$, the last divisible number is $999999$. You can count the numbers which are divisible by $7$ with using this formula:
$$\frac{\textrm{last number} - \textrm{first number}}{\textrm{space between numbers}} + 1$$
In this case, that would be: $$\frac{999999 - 100002}{7} + 1 = 128572.$$
A: In my opinion, you're making things more complicated than necessary.
Since $10^6$ divided by 7 leaves a remainder of 1, this means 999999 is the largest 6-digit number divisible by 7. And 999999 divided by 7 is 142857. So maybe the answer is 142857.
However, that counts 5-, 4-, 3- and 2-digit numbers that are divisible by 7, and 7 itself. Since $10^5$ divided by 7 leaves a remainder of 5, this means 99995 is the largest 5-digit number divisible by 7. And 99995 divided by 7 that's 14285.
The answer should now be obvious.
