Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #22 Mar 05 2024 15:02:57
%S 2,11,12,13,14,15,16,17,18,19,21,23,25,27,29,32,35,38,42,46,51,56,62,
%T 68,75,83,92,102,103,104,105,106,107,108,109,110,111,112,113,114,115,
%U 116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132
%N a(n) contains the digits of the remainder of a(n)/a(n-1). Sequence starts with 2.
%C 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
%H Alois P. Heinz, <a href="/A108199/b108199.txt">Table of n, a(n) for n = 1..20000</a>
%e 11 divided by 2 is 5 + remainder 1; "1" is in "11".
%e 12 divided by 11 is 1 + remainder 1; "1" is in "12".
%p A108199 := proc(n)
%p option remember ;
%p local a,r,dgsa,dgsr ;
%p if n =1 then
%p 2;
%p else
%p for a from procname(n-1)+1 do
%p r := modp(a,procname(n-1)) ;
%p if r > 0 then
%p dgsa := convert(a,base,10) ;
%p dgsr := convert(r,base,10) ;
%p if verify(dgsr,dgsa,'sublist') then
%p return a;
%p end if;
%p end if;
%p end do:
%p end if;
%p end proc:
%p seq(A108199(n),n=1..60) ; # _R. J. Mathar_, Jun 20 2021
%p # second Maple program:
%p d:= n-> {convert(n, base, 10)[]}:
%p a:= proc(n) option remember; local k; for k from 1+a(n-1) while
%p (r-> r=0 or d(r) minus d(k)<>{})(irem(k, a(n-1))) do od; k
%p end: a(1):=2:
%p seq(a(n), n=1..60); # _Alois P. Heinz_, Mar 05 2024
%t 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 *)
%K base,easy,nonn
%O 1,1
%A _Eric Angelini_, Jun 15 2005
%E Offset set to 1 by _R. J. Mathar_, Jun 20 2021