title_body: What is the formula for converting a 10 digit ISBN to a 13 digit ISBN?
upvoted_answer: Wikipedia gives it as
  
  
  Remove the ISBN 10 check digit from the end
  Add 978 to the front
  Add the ISBN-13 check digit to the end
  
  
  The check digit is calculated as per Wikipedia
  
  
  Take each digit as an element in in an array x_ i.e. the ith digit i the ISBN is x_i e.g. x4 is the 4th digit. 
  Multiply the even digits by 3 and sum these.
  add these to the sum of the odd digits
  find the remainder mod 10
  subtract from 10 (you have a number 1-10)
  This is the result as a number between 1 and 10, unless the figure is 10 then the result is 0
  
  x_13 = (10 - (x_1 + 3x_2 + x_3 + 3x_4 + ... + x_11 + 3x_12) mod10 ) mod 10