# If $4$ is written $4444$ times side by side, we shall get a number of $4444$ digits. What is the remainder when $7$ divides this large number?

If $4$ is written $4444$ times side by side, we shall get a number of $4444$ digits. What is the remainder when $7$ divides this large number?

Answer of this question is $1$ but I did not understand how?

Using this rule I tried solving the question, If P is a prime number>5 then any digit written (N-1) times will be divisible by P where N is a recurring decimal. Number of times digit gets repeated in $1/7$ is $6$

• Your numbers are of the form 4(10^n - 1)/9. This should help you. Think " periodic ".
– mick
Mar 19, 2017 at 19:48

Hint: consider $4,44,444,4444,44444,444444,\cdots$ modulo $7$. This is $4,2,3,6,1,0,\; 4,2,3,6,1,0,\cdots$. Do you see a pattern?
The answer is not $1$.
$$\frac{4}{9}(10^{4444}-1)\equiv 2(10^{4444}-1) \equiv 2(3^{4444}-1) \equiv 2(3^4-1) \equiv \color{red}{-1} \pmod{7}$$ by Fermat's little theorem.
• How did you get $2(10^{4444} - 1)$? Jun 14, 2017 at 13:23