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 A304024 #21 Jun 01 2018 08:16:07 %S A304024 2,22,212,2122,21222,212212,2122112,21221112,212211122,2122111222, %T A304024 21221112212,212211122122,2122111221212,21221112212112, %U A304024 212211122121122,2122111221211222,21221112212112212,212211122121122122 %N A304024 a(n) is the largest integer with n digits in base 3/2. %C A304024 Every number starts and ends with 2 and contains only twos and ones. %C A304024 Removing the last digit produces sequence A304272 of the largest even integers in base 3/2. %C A304024 The value of this sequence in base 10 is A304025. %C A304024 When adding 1 to the value of this sequence we get A070885. %C A304024 The largest integer with a given number of digits in base 3/2 can be produced directly from the smallest number, sequence A304023, by replacing 21 at the beginning and 0 at the end with 2, and by shifting the rest up by 1, see sequence A304023. %F A304024 a(1) = 2, for n > 1, a(n) = 10 * a(n - 1) + 2 if A304025(n - 1) is even. Otherwise, a(n) = 10 * a(n - 1) - 8. - _David A. Corneth_, May 11 2018 %e A304024 The number 5 in base 3/2 is 22, and the number 6 is 210. Therefore, 22 is the largest two-digit integer. %o A304024 (PARI) first(n) = {my(res=vector(n), c = 2); res[1]=2; for(i=2, n, res[i] = 10 * res[i-1] + 2; if(c % 2 == 1, res[i] -= 10); c = 3 * c / 2 + if(c%2==0, 2, 1/2)); res} \\ _David A. Corneth_, May 11 2018 %Y A304024 Cf. A005428, A024629, A070885, A073941, A081848, A246435, A303500, A304023, A304025, A304272. %K A304024 nonn,base,easy %O A304024 0,1 %A A304024 _Tanya Khovanova_ and PRIMES STEP Senior group, May 04 2018