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 A004283 #17 Mar 02 2020 19:35:16 %S A004283 1,11,10,11,101,110,1001,1111,100,101,11111,110,111,1001,1010,11011, %T A004283 10011,1100,100011,1111,10010,111001,100101,11110,110001,111111,1000, %U A004283 1001,1011011,1010,1011,100111,111110,1011111,101101,1100,1101 %N A004283 Least positive multiple of n written in base 3 using only 0 and 1. %H A004283 Robert Israel, <a href="/A004283/b004283.txt">Table of n, a(n) for n = 1..10000</a> %p A004283 h:= proc(n) %p A004283 option remember; %p A004283 local t,x; %p A004283 t:= n mod 3; %p A004283 if t = 2 then -1 %p A004283 else %p A004283 x:= procname((n-t)/3); %p A004283 if x = -1 then -1 %p A004283 else 10*x + t %p A004283 fi %p A004283 fi %p A004283 end proc: %p A004283 h(0):= 0: %p A004283 h(1):= 1: %p A004283 A004283:= proc(n) local k,r; %p A004283 for k from 1 do %p A004283 r:= h(k*n); %p A004283 if r <> -1 then return r fi %p A004283 od %p A004283 end proc: %p A004283 seq(A004283(n),n=1..100); # _Robert Israel_, Dec 26 2015 %t A004283 lpm3[n_]:=Module[{k=1},While[DigitCount[k*n,3,2]>0,k++];FromDigits[ IntegerDigits[ k*n,3]]]; Array[lpm3,40] (* _Harvey P. Dale_, Mar 02 2020 *) %o A004283 (PARI) a(n) = {k=1; while (vecmax(digits(k*n, 3)) != 1, k++); subst(Pol(digits(k*n, 3)), x, 10);} \\ _Michel Marcus_, Dec 27 2015 %Y A004283 Cf. A005836. %K A004283 nonn,base %O A004283 1,2 %A A004283 _David W. Wilson_ %E A004283 a(34) corrected by _Sean A. Irvine_, Dec 26 2015