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 52810525+52810522+...+528 which has 176 terms and each term is 15mod27 thus the number should be 17615mod27 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 limhrightarrow0fracsin(ha)h

How to find lim without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...