This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A309540 #34 Jan 12 2025 09:06:32 %S A309540 10,102,12,21,120,103,30,130,104,14,41,124,123,23,32,132,125,25,52, %T A309540 152,126,16,61,106,105,50,150,107,70,170,108,18,81,128,127,27,72,172, %U A309540 129,29,92,192,142,134,34,43,143,140,109,90,190,160,136,36,63,163 %N A309540 a(n) is the smallest positive number not yet in the sequence that contains exactly one even digit and exactly one odd digit from a(n-1), and no digit in a(n) is repeated. %H A309540 Robert Israel, <a href="/A309540/b309540.txt">Table of n, a(n) for n = 1..40534</a> %e A309540 a(2)=102: a(2) is not 100 (since zero would be repeated), nor 101 (since 1 would be repeated). %p A309540 filter:= proc(n) local L; %p A309540 L:= convert(n,base,10); %p A309540 nops(L) = nops(convert(L,set)) and convert(L mod 2,set) = {0,1}; %p A309540 end proc: %p A309540 Cands:= select(filter, [$11 .. 1000]): nC:= nops(Cands): %p A309540 R:= 10: r:= 10: r0, r1:= selectremove(type, convert(convert(r,base,10),set),even): %p A309540 for count from 1 do %p A309540 found:= false; %p A309540 for i from 1 to nC+1-count do %p A309540 x:= Cands[i]; %p A309540 Lx:= convert(convert(x,base,10),set); %p A309540 if nops(Lx intersect r0) = 1 and nops(Lx intersect r1) = 1 then %p A309540 found:= true; %p A309540 R:= R, x; %p A309540 r:= x; %p A309540 Cands:= subsop(i=NULL, Cands); %p A309540 r0, r1:= selectremove(type, convert(convert(r,base,10),set),even); %p A309540 break %p A309540 fi %p A309540 od; %p A309540 if not found then break fi; %p A309540 od: %p A309540 R; # _Robert Israel_, Jan 09 2025 %Y A309540 Cf. A184992, A318700, A309390, A309539, A076654. %K A309540 nonn,base,fini,full,look %O A309540 1,1 %A A309540 _Enrique Navarrete_, Aug 06 2019 %E A309540 Edited by _Robert Israel_, Jan 10 2025