Monday 16 September 2019

elementary number theory - Find the remainder when $ 528528528...$up to $528$ digits is divided by $27$?



Find the remainder when $528528528...$up to $528$ digits is divided by $27$?
Here's what I have done: The number can be written as $528\cdot 10^{525}+528\cdot 10^{522}+...+528$ which has $176$ terms and each term is $\equiv15 \mod 27$ thus the number should be $176*15 \mod 27$ hence $21$ should be the remainder. But book says it is $6$. I don't understand the flaw in my logic. Please correct me.


Answer



Here is a python3 session




>>> s = '528' * 176
>>> len(s)
528
>>> int(s) % 27
21

1 comment:

  1. Isn’t that addition of all the digits methodology applicable for divisibility by 3 and 9, I am not sure if you can apply the same to 27?

    ReplyDelete

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...