OFFSET
0,3
COMMENTS
Also, numbers n such that A123895(n) = n. Each digit is either 0, has occurred before, or is one more than the largest preceding digit. The number of k-digit numbers in this sequence is A005493(k-1) for 2<=k<=9. The initial 0 prevents a match for k=1; later values fall short because there are no digits beyond 9 available in decimal.
LINKS
R. J. Mathar, Table of n, a(n) for n = 0..876
MAPLE
bag := {} ;
for i from 0 to 99999 do
bag := bag union {A123895(i)} ;
end do:
sort(convert(bag, list)) ; # R. J. Mathar, Dec 10 2015
MATHEMATICA
f[n_] := Block[{d = Prepend[IntegerDigits@ n, 0], a, b, w}, b = DeleteDuplicates@ d; a = Range[0, Length@ b]; w = FromDigits@ Flatten[Part[a, FirstPosition[b, #]] & /@ d]; w]; Union@ Table[f@n, {n, 0, 10^4}] (* Michael De Vlieger, Dec 09 2015, Version 10 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Franklin T. Adams-Watters, Nov 20 2006
STATUS
approved