Testing divisibility by 7 of number in base 8 [duplicate]

Is the number 3776543210123456773, in base 8, divisible by 7?

I started by expanding the number:
3 * $$8^0$$ + 7 * $$8^1$$ + 7 * $$8^2$$ + ...
3 * $$(7 + 1)^0$$ + 7 * $$(7 + 1)^1$$ + 7 * $$(7 + 1)^2$$ + ...

Then, by using Newton's Binomial Theorem, I reasoned that for each binomial, only the first term wouldn't be divisible by 7 since it would be equal to 1. This led me to the conclusion that each digit of the initial number would be multiplied by one once. Therefore, if the sum of all digits was divisible by 7, the number would also be divisible by 7.

However, I converted this number to base 10 and the remainder of the division by 7 was equal to 2, instead of 0, which was the result I found using the reasoning above.

I can't seem to find where I made a mistake. :c

marked as duplicate by Bill Dubuque divisibility StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jun 3 at 15:48

• Any number in base $8$ is divisible by $7$ if and only if it's digit sum is divisible by $7$. – Peter Foreman May 4 at 22:11
Your reasoning is correct. But the sum of the digits of the digits of your number is $$76$$. And the remainder of the division of $$76$$ by $$7$$ is $$6$$, of course. So, the remainder of the division of your number by $$7$$ is $$6$$ too.
And, in base $$10$$, your number is $$72\,011\,638\,983\,515\,643$$, whose remainder, when divided by $$7$$, is $$6$$ too.