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 A125292 #13 Feb 16 2025 08:33:04 %S A125292 1,2,3,4,6,8,9,10,12,13,18,20,24,26,27,28,30,31,36,37,39,40,54,56,60, %T A125292 62,72,74,78,80,81,82,84,85,90,91,93,94,108,109,111,112,117,118,120, %U A125292 121,162,164,168,170,180,182,186,188,216,218,222,224,234,236,240,242,243 %N A125292 Numbers having either no ones or no twos in their ternary representation. %C A125292 Complement of A125293; union of A005823 and A005836; %C A125292 A125291(a(n)) = 1; A062756(a(n))*A081603(a(n)) = 0. %H A125292 Rémy Sigrist, <a href="/A125292/b125292.txt">Table of n, a(n) for n = 1..8190</a> %H A125292 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Ternary.html">Ternary</a> %H A125292 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Repdigit.html">Repdigit</a> %t A125292 not[n_]:=Module[{c=DigitCount[n,3]},c[[1]]==0||c[[2]]==0]; Select[ Range[ 250],not] (* _Harvey P. Dale_, Dec 15 2012 *) %o A125292 (PARI) is(n, base=3) = #Set(select(sign, digits(n, base)))==1 \\ Rémy Sigrist, Mar 28 2020 %o A125292 (PARI) a(n, base=3) = { for (w=0, oo, if (n<=(base-1)*2^w, my (d=1+(n-1)\2^w, k=2^w+(n-1)%(2^w)); return (d*fromdigits(binary(k), base)), n -= (base-1)*2^w)) } \\ Rémy Sigrist, Mar 28 2020 %Y A125292 Subsequence of A154314. %Y A125292 Cf. A007089, A125289. %K A125292 nonn,base,easy %O A125292 1,2 %A A125292 _Reinhard Zumkeller_, Nov 26 2006