Let $a_k = (1,3,2,-1,-3,-2,...)$ be a periodic sequence with $a_{6l} = 1, a_{6l+1} = 3, a_{6l+2}=2,a_{6l+3}=-1,a_{6l+4}=-3,a_{6l+5}=-2, l = \{0,1,2,...\}.$ For a given number $b = \sum_{k=0}^m b_k 10^k,$ I need to prove that it is divisible by $7$ if and only if the weighted sum $\sum_{k=0}^m a_k b_k$ is also divisible by $7$. Can you provide any hint or a solution to this problem ? Thanks.
Asked
Active
Viewed 71 times
0
-
3Are you familiar with modular arithmetic? $a_k\equiv 10^k\pmod7$ – J. W. Tanner Nov 06 '22 at 18:29
-
Thanks. Somehow yes. I do not see how to use it here. – user996159 Nov 06 '22 at 18:33
-
2Since $a_k\equiv10^k\pmod7$, $\sum_{k=0}^m b_k10^k\equiv\sum_{k=0}^m a_kb_k\pmod7$, so $\sum_{i=0}^m b_k10^k\equiv0\pmod7\iff\sum_{k=0}^m a_kb_k\equiv0\pmod7$ – J. W. Tanner Nov 06 '22 at 18:40
-
1$\sum b_k 10^k$ will be divisible by $7$ if and only if $\sum b_k c_k$ where $c^k\equiv 10^k \pmod 7$ is divisible by $7$. We know $10^6\equiv 1 \pmod 7$ so we know we can get a period sequence of $c_1,...c_6$ that do what we need. $10^1\equiv 3, 10^2\equiv 2, 10^3\equiv -1$ etc. so $c_k = a_{k}$ will do. ANd that's it. we are done. – fleablood Nov 06 '22 at 18:46
-
As here in the dupe, your sequence is the powers of $10\equiv 3\pmod 7,$ so your test simply evaluates $!\bmod 7,$ the radix $10$ polynomial of $b\ \ $ – Bill Dubuque Nov 07 '22 at 03:21
1 Answers
1
Suppose you have a two-digit number $gh$. Then
$$gh = g\times 10 + h = g\times (7+3) + h = 7g+3g+h$$
So $gh$ is divisible by $7$ iff $3g+h$ is divisible by $7$.
The coefficients on $g$ and $h$ are the first two elements of your sequence $1, 3, \ldots$.
-
Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Nov 07 '22 at 03:21
-
1@BillDubuque A good number of us don't really care what the policies are. The tyranny of the majority is a great evil. Strive not to be part of it. – B. Goddard Nov 07 '22 at 09:57