OFFSET
1,2
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..1000
EXAMPLE
a(4) = 112 because 1^3 + 1^2 + 2^1 = 4.
36(10) in base 10 is represented as 21111 in this base because 2^5 + 1^4 + 1^3 + 1^2 + 1^1 = 36. It could also be represented as 1111112222. The minimal representation, considered in base 10, is chosen.
MATHEMATICA
t = Range[1000]*0; Do[d=1+IntegerDigits[k, 2, n]; dd = FromDigits@d; v = Total[ Reverse[d]^ Range[n]]; If[0 < v <= 1000 && (t[[v]] == 0 || dd < t[[v]]), t[[v]] = dd], {n, 17}, {k, 0, 2^n-1}]; t (* first 1000 terms, Giovanni Resta, Jan 16 2014 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robin Garcia, Jan 16 2014
STATUS
approved