|
|
A260529
|
|
Concatenate the positions of digits 9, 8,..., 0 in the decimal representation of n, using 1 for the rightmost digit etc., skip it if a digit does not occur.
|
|
4
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 21, 12, 12, 12, 12, 12, 12, 12, 12, 12, 21, 21, 12, 12, 12, 12, 12, 12, 12, 12, 21, 21, 21, 12, 12, 12, 12, 12, 12, 12, 21, 21, 21, 21, 12, 12, 12, 12, 12, 12, 21, 21, 21, 21, 21, 12, 12, 12, 12, 12, 21, 21, 21, 21, 21, 21, 12
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,11
|
|
COMMENTS
|
Sequence A260275 lists fixed points of this function.
|
|
LINKS
|
|
|
EXAMPLE
|
Consider n=1103, digits 4-9 do not occur, the digit '3' is at the 1st position (looking from the right), digit '2' does not occur, digit '1' is in 3rd and 4th place, digit '0' at 2nd position. Thus a(1103) = 1342.
|
|
PROG
|
(PARI) a(n)={my(p=vector(10)); for(i=1, #n=if(n, Vecrev(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
|
|
|
STATUS
|
approved
|
|
|
|