This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A231963 #21 Feb 16 2025 08:33:20 %S A231963 17,24,31,48,55,62,79,86,93,109,116,123,130,147,154,161,178,185,192, %T A231963 208,215,222,239,246,253,260,277,284,291,307,314,321,338,345,352,369, %U A231963 376,383,390,406,413,420,437,444,451,468,475,482,499,505,512,529,536,543,550,567,574,581 %N A231963 Concatenate n with its UPC check digit, a(n) = 10*n + A237042(n). %C A231963 Theoretically, a UPC check digit can be used with 1- or 2-digit numbers as well as numbers with more than 17 digits. There is probably no practical need for the former, while the latter would probably require a more robust error-detecting (if not error-correcting) mechanism. %C A231963 However, the UPC check digit is a more robust mechanism than a simple digital root would be, as it guards against dyslexia when a seemingly scannable UPC code does not scan and the human operator has to type in the code (whether a cash register or a mobile scanner). %C A231963 This is because to generate the check digit, the digits in the one's place, hundred's place, ten hundred's place, etc., are multiplied by 3. Thus, for example, 13 gives 0 for a check digit while 31 gives 4 for a check digit. %C A231963 Some manufacturers that have or might have UPCs ending in the numbers shown above include H. J. Heinz (013000) and the Hershey Company (068000). %C A231963 As a rule of thumb, the terms mostly advance in steps of 7, sometimes 17. %D A231963 David Salomon, Coding for Data and Computer Communications. New York: Springer (2006): 41 - 42. %H A231963 GS1, <a href="http://www.gs1.org/barcodes/support/check_digit_calculator">Check Digit Calculator</a>. %H A231963 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/UPC.html">UPC</a>. %F A231963 a(n) = 10n + c(n), where c(n) = A237042(n) = -( (Sum_{i=1..floor(L/2)} d(2i-1)) + 3*(Sum_{j=0..floor(L/2)} d(2j)) ) mod 10, where L is how many digits n has, d(L - 1) is the most significant digit of n, ..., and d(0) is the one's place digit. %e A231963 a(13) = 130 because 1 * 1 + 3 * 3 = 10, giving a check digit of 0. %e A231963 a(14) = 147 because 1 * 1 + 4 * 3 = 13, and -13 = 7 mod 10. %e A231963 a(15) = 154 because 1 * 1 + 5 * 3 = 16, and -16 = 4 mod 10. %o A231963 (PARI) a(n) = 10*n + vecsum(digits(n,100)*31\-10) % 10; \\ _Kevin Ryde_, Oct 03 2023 %Y A231963 Cf. A237042, A093018, A108773. %K A231963 nonn,base,easy %O A231963 1,1 %A A231963 _Alonso del Arte_, Nov 15 2013