0

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

pug
  • 55
  • 3
    Any number in base $8$ is divisible by $7$ if and only if it's digit sum is divisible by $7$. – Peter Foreman May 04 '19 at 22:11
  • Simple computer check: "yes." – David G. Stork May 04 '19 at 22:12
  • My reasoning was correct, then? That would mean the mistake happened in the conversion of the number to base 10, right? – pug May 04 '19 at 22:12
  • That gives a remainder of 6. And the online converter I used gave me 72011638983515632. I'm utterly confused. – pug May 04 '19 at 22:20
  • 2
    Your online converter is incorrect as the input number is odd whereas what you just wrote is even. – Peter Foreman May 04 '19 at 22:21
  • You're right, I hadn't notice that. I double checked now and the sum of all digits gives the same remainder of 6. I guess my reasoning was right, then. Thank you so much for the help. – pug May 04 '19 at 22:25
  • 2
    The online calculator must be using double precision floating point for its storage format; unfortunately, the number is more detailed than that format can contain, so the conversion is incorrect. I wrote about that sort of problem in an answer to another question about numbers not going through software fully intact: https://math.stackexchange.com/a/2839637/167895 – Dan Uznanski May 04 '19 at 22:28
  • https://math.stackexchange.com/questions/328562/divisibility-criteria-for-7-11-13-17-19 – lab bhattacharjee May 05 '19 at 03:38

1 Answers1

3

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.