OFFSET
0,11
EXAMPLE
Consider n=1103: the digit '3' is at the 4th position (looking from the left), digit '1' is in 1st and 2nd place, digit '0' is at 3rd position, digits 2 and 4-9 do not occur. Thus a(1103) = 4123.
PROG
(PARI) a(n)={my(p=vector(10)); for(i=1, #n=if(n, digits(n), [0]), p[n[i]+1]=if(p[n[i]+1], concat(p[n[i]+1], i), i)); if(1<#p=concat(Vecrev(select(t->#t, p))), p[1]=Str(p[1]); eval(concat(p)), p)}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Jul 28 2015
STATUS
approved