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 A353624 #10 May 01 2022 11:42:33 %S A353624 0,2,6,6,8,30,18,21,16,18,20,55,24,26,84,90,80,51,54,57,60,63,132,46, %T A353624 48,75,52,54,56,87,60,62,288,165,408,70,72,74,456,78,80,246,252,516, %U A353624 484,270,276,658,240,441,400,153,156,159,162,165,168,171,522,649 %N A353624 a(0) = 0, and for n > 0, a(n) is the least multiple of n that can be added to n without carries in balanced ternary. %C A353624 Two integers can be added without carries in balanced ternary if they have no equal nonzero digit at the same position. %H A353624 Rémy Sigrist, <a href="/A353624/b353624.txt">Table of n, a(n) for n = 0..10000</a> %H A353624 Wikipedia, <a href="https://en.wikipedia.org/wiki/Balanced_ternary">Balanced ternary</a> %F A353624 a(n) = n * A353623(n). %F A353624 a(3*n) = 3*a(n). %e A353624 For n = 5: %e A353624 - we consider the following cases: %e A353624 k bter(k*5) carries? %e A353624 - --------- -------- %e A353624 1 1TT yes %e A353624 2 101 yes %e A353624 3 1TT0 yes %e A353624 4 1T1T yes %e A353624 5 10T1 yes %e A353624 6 1010 no %e A353624 - so a(5) = 6*5 = 30. %o A353624 (PARI) ok(u,v) = { while (u && v, my (uu=[0,+1,-1][1+u%3], vv=[0,+1,-1][1+v%3]); if (abs(uu+vv)>1, return (0)); u=(u-uu)/3; v=(v-vv)/3); return (1) } %o A353624 a(n) = for (k=1, oo, if (ok(n, n*k), return (n*k))) %Y A353624 Cf. A059095, A261892 (binary analog), A353623. %K A353624 nonn,base %O A353624 0,2 %A A353624 _Rémy Sigrist_, Apr 30 2022