OFFSET
1,2
COMMENTS
A permutation of the positive integers.
EXAMPLE
a(1) = 1 is the least positive integer, and a(1) has no other constraint to satisfy.
a(2) = 10 is the least positive integer > a(1) = 1 such that a(2)*a(1) = 10 has a digit 1. (For all small choices 2, ..., 9 this is not the case.)
a(3) = 11 is the smallest positive integer not in {1, 10} such that a(3)*a(2) (= 110) has a digit 1.
a(4) = 12 is the least positive integer not in {1, 10, 11} such that a(4)*a(3) (= 132) has a digit 1: All smaller choices 2, 3, ..., 9 do not satisfy this.
PROG
(PARI) A299981(n, f=1, d=1, a=1, u=[a])={for(n=2, n, f&&if(f==1, print1(a", "), write(f, n-1, " "a)); for(k=u[1]+1, oo, setsearch(u, k)&&next; setsearch(Set(digits(a*k)), d)&&(a=k)&&break); u=setunion(u, [a]); while(#u>1&&u[2]==u[1]+1, u=u[^1])); a}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Feb 22 2018
STATUS
approved