OFFSET
0,3
COMMENTS
A variant of A248024.
This is a permutation of the nonnegative integers, see A257276 for the inverse permutation.
There are large ranges of fixed points, e.g., between a(135) = 99 and a(200) = 201, or between a(1080) = 999 and a(2000) = 2001. For indices n in these ranges, the sequence restricted to [0...n] is a permutation (i.e., all numbers up to n appear among the values up to that point).
If one requires that a(n+1) has *no* digit dividing a(n), the sequence starts 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 30, 40, 33, 22, 34, ... and stops at a(1422) = 2520, divisible by any digit. If one requires the sequence to be increasing, then it goes ..., 20, 30, 40, 60, 70, 80, 90, 400, 600, 700, 800, 900, 7000, 9000, 70000, 90000, 700000, 900000, ...
LINKS
M. F. Hasler, Table of n, a(n) for n = 0..1199
E. Angelini, Division by digits (variation), SeqFan list, May 7, 2015.
PROG
(PARI) {u=n=0; until(print1(n", "), u+=1<<n; d=select(i->!(n%i), vector(9, i, i)); n=0; until(!bittest(u, n++)&&setintersect(d, Set(digits(n))), ))}
CROSSREFS
KEYWORD
AUTHOR
Eric Angelini and M. F. Hasler, May 07 2015
STATUS
approved