Dudeney Numbers

Only six numbers have this curious property:

1 = 1; 13 = 1
8 = 5 + 1 + 2; 83 = 512
17 = 4 + 9 + 1 + 3; 173 = 4913
18 = 5 + 8 + 3 + 2; 183 = 5832
26 = 1 + 7 + 5 + 7 + 6; 263 = 17576
27 = 1 + 9 + 6 + 8 + 3; 273 = 19683

They’re called Dudeney numbers, after the English author and mathematician who discovered them. (Regular readers know I’m something of a fan.)