login
A330286
Tally the digits of n: list the distinct digits of n in order of appearance, each followed by the respective count, concatenate.
1
1, 11, 21, 31, 41, 51, 61, 71, 81, 91, 1101, 12, 1121, 1131, 1141, 1151, 1161, 1171, 1181, 1191, 2101, 2111, 22, 2131, 2141, 2151, 2161, 2171, 2181, 2191, 3101, 3111, 3121, 32, 3141, 3151, 3161, 3171, 3181, 3191, 4101, 4111, 4121, 4131, 42, 4151, 4161, 4171, 4181, 4191, 5101, 5111
OFFSET
0,2
COMMENTS
The term a(0) = 1 means 01 without the leading zero; no other number is affected by this problem of the leading zero.
Similar to the "Look & Say" operation LS = A045918, in which the count precedes the digit. However, here each distinct digit is considered only once: Thus, while LS(121) = 111211, a(121) = 1221 ("digit 1 twice, digit 2 once").
FORMULA
If n is in A010784 (has only distinct digits), then a(n) = (n with an additional digit 1 inserted after each digit).
EXAMPLE
a(1) = 11 for "digit 1, once".
a(10) = 1101 for "digit 1, once; digit 0, once".
a(11) = 12 for "digit 1, twice".
a(12) = 1121 for "digit 1, once; digit 2, once".
a(100) = 1102 for "digit 1, once; digit 0, twice".a(111) = 13, for "digit 1, three times".
MATHEMATICA
A330286[n_] := FromDigits@ Flatten@ IntegerDigits@ Flatten@ Tally@ IntegerDigits[n];
Table[A330286[n], {n, 0, 50}]
PROG
(PARI) apply( a(n)={eval(concat(vector(#n=digits(n), i, if(!setsearch(Set(n[1..i-1]), n[i]), Str(n[i], #select(d->d==n[i], n)), ""))))}, [1..111])
CROSSREFS
Cf. A045918 (look and say), A010784.
Sequence in context: A017281 A061589 A110402 * A081927 A181178 A178205
KEYWORD
nonn,base,less
AUTHOR
M. F. Hasler, Dec 09 2019
STATUS
approved