applet-magic.com Thayer Watkins Silicon Valley, Tornado Alley & BB Island USA |
---|
of Terminating Decimal Numbers |
The integral powers of numbers are just special cases of products so
But the computation of DigitSum(n^{m}) can be further simplified through a simplification of the exponent.
The DigitSum(n^{m}) follows cycles or some even simpler pattern; i.e.,
m | ||||||||||
n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
2 | 1 | 2 | 4 | 8 | 7 | 5 | 1 | 2 | 4 | 8 |
3 | 1 | 3 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 |
4 | 1 | 4 | 7 | 1 | 4 | 7 | 1 | 4 | 7 | 1 |
5 | 1 | 5 | 7 | 8 | 4 | 2 | 1 | 5 | 7 | 8 |
6 | 1 | 6 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 |
7 | 1 | 7 | 4 | 1 | 7 | 4 | 1 | 7 | 4 | 1 |
8 | 1 | 8 | 1 | 8 | 1 | 8 | 1 | 8 | 1 | 8 |
9 | 1 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 |
The patterns in the above table could be represented as
but a better representation would be
where for example h_{2}(m)= remainder after division of m by 6 = (m mod 6) = m%6 and
m | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
h_{2}(h) | 1 | 2 | 4 | 8 | 7 | 5 | 1 |
For the digits with a cyclical pattern
h_{2}(m) | m mod 6 |
h_{4}(m) | m mod 3 |
h_{5}(m) | m mod 6 |
h_{7}(m) | m mod 3 |
h_{8}(m) | m mod 2 |
For 3, 6 and 9 the functions are even simpler; i.e.,
The nature of h_{n}(m) depends upon whether for a digit n there exists a nonzero solution to the equation n^{q}=1 or if there instead exists a solution to n^{q}=9. If there exists a solution to n^{q}=1 then h_{n}(m) = m mod q. If instead there exists a solution to n^{q}=9 then h_{n}(m) = {0,1,...,q,q,...}.
The relationships between the solutions to n^{q}=1 for n={2,4,8} is very simple. If q_{n} is the solution for n, then
Likewise q_{8} = q_{2}/3 = 6/3 = 2.
Furthermore, since DigitSum(2*5)=1, DigitSum((2*5)^{q2}=1 and hence 5^{q2}=1 and therefore q_{5}=q_{2}=6. Likewise DigitSum(7*4)=1 so q_{7}=q_{4}=3.
The patterns found above for the powers of integers carries over to the negative powers to some extent. For example, 2^{−1}=0.5 so the DigitSum(2^{−1})=5 and DigitSum(2^{−1})=DigitSum(0.25)=7, etc. However the DigitSum(3^{−1}) is not defined.
A limited tabulation of the digit sums of the negative powers of digits is shown below:
m | ||||||
n | −6 | −5 | −4 | −3 | −2 | −1 |
2 | 1 | 2 | 4 | 8 | 7 | 5 |
4 | 1 | 4 | 7 | 1 | 4 | 7 |
5 | 1 | 5 | 7 | 8 | 4 | 2 |
8 | 1 | 8 | 1 | 8 | 1 | 8 |
Although the reciprocal of 7 is a nonterminating decimal a digit sum may be defined for it of 4. This is possible because 7 has multiplicative inverse of 4 modulo 9; i.e., 7*4=1 mod 9. See Digit sums for repeating decimals. With DigitSum(7^{−1})=4 the pattern for the negative powers of 7 is the same pattern as the positive powers of 4; i.e., {1,4,7,1,4,7,....}.
If a is a terminating decimal then DigitSum(a^{m}) follows the same pattern as for DigitSum(n^{m}). The decimal point is shifted but that does not affect the digit sum. For example, if a=0.4 then a^{m}=4^{m}/10^{m} and hence DigitSum(0.4^{m})=DigitSum(4^{m}).
(To be continued.)
HOME PAGE OF Thayer Watkins |