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 A304023 #40 Feb 13 2021 06:27:01 %S A304023 0,20,210,2100,21010,210110,2101100,21011000,210110000,2101100010, %T A304023 21011000110,210110001100,2101100011010,21011000110100, %U A304023 210110001101000,2101100011010010,21011000110100110,210110001101001100,2101100011010011010,21011000110100110100,210110001101001101010 %N A304023 a(n) is the smallest integer with n digits in base 3/2 expressed in base 3/2. %C A304023 Excluding 0, every term starts with 2 and has exactly one 2. %C A304023 The last digit is always zero. %C A304023 Removing the last digit produces the sequence A303500 of the smallest even integers in base 3/2. %C A304023 The value of this sequence in base 10 is A070885. %C A304023 When subtracting 1 from the value of this sequence we get A304025. %C A304023 The largest integer with a given number of digits in base 3/2 can be produced directly from this sequence by replacing 21 at the beginning and 0 at the end with 2, and by shifting the rest up by 1, see sequence A304024. %H A304023 B. Chen, R. Chen, J. Guo, S. Lee et al., <a href="http://arxiv.org/abs/1808.04304">On Base 3/2 and its Sequences</a>, arXiv:1808.04304 [math.NT], 2018. %F A304023 a(n) = A024629(A070885(n)). - _Michel Marcus_, Jun 19 2018 %e A304023 The number 5 in base 3/2 is 22, and the number 6 is 210. Therefore, 210 is the smallest three-digit integer. %p A304023 b:= proc(n) b(n):= `if`(n=1, 1, 3*ceil(b(n-1)/2)) end: %p A304023 g:= proc(n) g(n):= `if`(n<2, 0, irem(n, 3, 'q')+g(2*q)*10) end: %p A304023 a:= n-> g(b(n)): %p A304023 seq(a(n), n=1..30); # _Alois P. Heinz_, Feb 13 2021 %o A304023 (Python) %o A304023 def f(n): return 0 if n < 1 else f(n//3*2)*10 + n%3 %o A304023 def a(n): %o A304023 k = 0 %o A304023 while len(str(f(k))) != n: k += 1 %o A304023 return f(k) %o A304023 print([a(n) for n in range(1, 22)]) # _Michael S. Branicky_, Feb 12 2021 after _Michel Marcus_ %o A304023 (PARI) f(n) = if( n<1, 0, f(n\3 * 2) * 10 + n%3); %o A304023 a(n) = {my(k=0); while(#Str(f(k)) != n, k++); f(k);} \\ _Michel Marcus_, Jun 19 2018 %Y A304023 Cf. A304024, A304025, A070885, A303500, A304272, A024629, A081848, A246435, A005428, A073941. %K A304023 nonn,base %O A304023 1,2 %A A304023 _Tanya Khovanova_ and PRIMES STEP Senior group, May 04 2018 %E A304023 More terms from _Michel Marcus_, Jun 19 2018