a(10) = 2 because 10^2 = 100 in all bases >= 2. a(14) = 17 because in base 16, 14^2 is 1|9|0 while in base 17 14^2 is 1|8|16 (where numbers separated by |'s represent individual digits, whereas digits with no | in between stand for a single digit in bases greater than 10.