OFFSET
1,1
COMMENTS
Clarifications: To reproduce the terms, only a(n) > a(n-1) are admitted. If the remainder is zero, that candidate a(n) is not admitted and the next larger a(n) is tested. (See the Maple implementation). Example: after 2, the candidates 3 to 9 are not admitted (remainder's digits are not subsets of candidate digits), but 10 (remainder 0) is also not admitted; finally 11 (remainder 11/2=1) follows 2. - R. J. Mathar, Feb 23 2024
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
EXAMPLE
11 divided by 2 is 5 + remainder 1; "1" is in "11".
12 divided by 11 is 1 + remainder 1; "1" is in "12".
MAPLE
A108199 := proc(n)
option remember ;
local a, r, dgsa, dgsr ;
if n =1 then
2;
else
for a from procname(n-1)+1 do
r := modp(a, procname(n-1)) ;
if r > 0 then
dgsa := convert(a, base, 10) ;
dgsr := convert(r, base, 10) ;
if verify(dgsr, dgsa, 'sublist') then
return a;
end if;
end if;
end do:
end if;
end proc:
seq(A108199(n), n=1..60) ; # R. J. Mathar, Jun 20 2021
# second Maple program:
d:= n-> {convert(n, base, 10)[]}:
a:= proc(n) option remember; local k; for k from 1+a(n-1) while
(r-> r=0 or d(r) minus d(k)<>{})(irem(k, a(n-1))) do od; k
end: a(1):=2:
seq(a(n), n=1..60); # Alois P. Heinz, Mar 05 2024
MATHEMATICA
l={2}; a[1]=2; k=2; Do[r=Mod[n, a[k-1]]; If[ContainsAny[IntegerDigits[r], IntegerDigits[n]], If[r>0, AppendTo[l, n]; a[k]=n; k++]], {n, 3, 127}]; l (* James C. McMahon, Feb 25 2024 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Jun 15 2005
EXTENSIONS
Offset set to 1 by R. J. Mathar, Jun 20 2021
STATUS
approved