Element names above 118

Python 3, Unhexseptium (167) bytes

h=x='';r=str.replace
for i in input():s=r('nubtqphsoeinirueeecnl  ianxptn    dt t'[int(i)::10],' ','');h+=s;x+=s[0]
print(r(r(h+'ium\n','ii','i'),'nnn','nn')+x.title())

These are the results when the program is run on every number from 1 to 999 (inclusive)


Mathematica 10.1, indium (49) cadmium (48)

This solution uses a built-in library of element properties, including IUPAC names and abbreviations. (I haven't seen this as a technique to be avoided in Golf. It seems to be encouraged. But this might be on (perhaps over) the edge of acceptable -- Mathematica implements this library (and many others) by downloading data from Wolfram's servers the first time you use it (and I presume checks for updates occasionally).)

f=ElementData@@@{{#,"Abbreviation"},{#,"Name"}}&
(* 
Improved by @user5254 from 
f[n_]:=ElementData[n,#]&/@{"Abbreviation","Name"} 
*)

f[48]
(* {"Cd", "cadmium"} *)

f[118]
(* {"Uuo", "ununoctium"} *)

f[122]
(* {"Ubb", "unbibium"} *)

f[190]
(* {"Uen", "unennilium"} *)

f[558]
(* {"Ppo", "pentpentoctium"} *)

f[10^100-1]
(* {"Eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "ennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennennium"} *)

How would this compare to using elements.py or periodictable.py in Python?

Edit: Months later: Noticed I had typo'ed the abbreviation output for 122. I've re-run the code and verified that I made this error, not Mathematica.


Pip, Thorium Actinium Radon (86)

(Don't inhale this entry, it'll give you lung cancer.)

P(aR,tY"nil un bi tri quad pent hex sept oct enn"^s)."ium"R`ii|nnn`_@>1Yy@_@0MaUC:y@0y

Takes the element number as a command-line argument and outputs the name & abbreviation on separate lines.

Explanation (somewhat ungolfed):

Y"nil un bi tri quad pent hex sept oct enn"^s  Build list of prefixes & store in y

    ,t                                         Range(10)
 (aR  y)                                       Replace each digit in input with
                                                 corresponding element in prefix list
        ."ium"                                 Append "ium"
              R`ii|nnn`_@>1                    Reduce too-long runs of letters
P                                              Print

 {y@a@0}Ma                                     For each digit in input, get first character
                                                 of corresponding prefix
Y                                              Store that list in y
          UC:y@0                               Uppercase the first item of y in place
                y                              Print y (items concatenated)

The ii and nnn handling uses a regex replacement with a callback function (added in the most recent version of Pip): for every match of ii|nnn, take all but the first character and use as a replacement.