
MATHEMATICA

(* Max exponent 8 is sufficient to get all known solutions *)
f[_] = 0; Reap[Do[n = 2^a + 3^b; f[n] = f[n] + 1; If[f[n] == 1, ab[n] = {a, b}, If[f[n] >= 2, Print[HoldForm[2^x + 3^y] /. Thread[{x, y} > ab[n]], " = ", HoldForm[2^x + 3^y] /. Thread[{x, y} > {a, b}], " = ", n]; Sow[n]]], {a, 0, 8}, {b, 0, 8}]][[2, 1]] // Union (* JeanFrançois Alcover, Apr 29 2014 *)
