This is an example of checking whether Universal Product Codes (UPC) or International Standard Book Number (ISBN) codes are legitimate. Is the shown code valid? and how do you prove it?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
In order for the 12 digit UPC code above to be legitimate, we order the digits x 1 , x 2 , x 3 , ⋅ ⋅ ⋅ , x 1 2 .
The expression 3 x 1 + x 2 + 3 x 3 + x 4 + 3 x 5 + x 6 + 3 x 7 + x 8 + 3 x 9 + x 1 0 + 3 x 1 1 + x 1 2 must be divisible by 10.
We indeed verify that the above code gives:
0 × 3 + 3 × 1 + 6 × 3 + 0 × 1 + 0 × 3 + 0 × 1 + 2 × 3 + 9 × 1 + 1 × 3 + 4 × 1 + 5 × 3 + 2 × 1 = 6 0 , which is divisible by 10.
Therefore the above UPC code is valid.