Sum Squared Digits = Number (Posted on 2010-10-16)

Determine all possible values of a duodecimal (base 12) positive integer N, such that N is obtained by adding the squares of its digits.

Bonus Question:
Determine all possible values of a octodecimal (base 18) positive integer N, such that N is obtained by adding the squares of its digits.