|
|
A108199
|
|
a(n) contains the digits of the remainder of a(n)/a(n-1). Sequence starts with 2.
|
|
1
|
|
|
2, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 27, 29, 32, 35, 38, 42, 46, 51, 56, 62, 68, 75, 83, 92, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
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:
# 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:
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|