Digit Sum | Digit Sum below Value | Base-k Digit Sum | Weighted Digit Sum | Digit Product | Triangular Number
Calculate Weighted Digit Sum
Calculates the weighted digit sum from a weighting sequence and one or more numbers or a whole text. Only numbers are interpreted, all other characters will be ignored. At the weighted digit sum, the single ciphers are multiplied with the according numbers of the sequence and then added to each other. When the weighting sequence is run through, it starts anew. Please enter the values of the weighting sequence separated with spaces.
Example: for the weighting sequence 1 2 3 4 5 the weighted digit sum of 987654321 = 1*9 + 2*8 + 3*7 + 4*6 + 5*5 + 1*4 + 2*3 + 3*2 + 4*1 = 115
Weighted digit sums are often used for checksums because in many cases they are better suited to detecting certain errors than normal digit sums. For example, a simple number transposition, such as 54 instead of 45, goes unnoticed with a normal digit sum, but is detected with a weighted digit sum. A well-known example in which the weighted digit sum is used as a checksum to detect input errors is the ISBN, the International Standard Book Number, which is unique for every book and similar product in the world. This consists of a long sequence of numbers, which therefore carries a high risk of incorrect entries. For the ten-digit ISBN, the weighting sequence is 10 9 8 7 and so on, and the result must be divisible by 11. For the thirteen-digit ISBN, the weighting sequence is 1 3, the result is calculated modulo 10 and subtracted from 10, and the result is the check digit, the last digit of the ISBN-13, which was not included in the previous weighting.
This calculator is designed for a weighted digit sum using a fixed sequence of numbers. It's also possible to weight using a formula. For example, if you're weighting using square numbers, the sequence would be 1 4 9 16 25, and so on. Which weighting sequence makes the most sense depends on the application and isn't easy to decide.