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 A081606 #32 Oct 29 2024 12:39:55 %S A081606 1,3,4,5,7,9,10,11,12,13,14,15,16,17,19,21,22,23,25,27,28,29,30,31,32, %T A081606 33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57, %U A081606 58,59,61,63,64,65,66,67,68,69,70,71,73,75,76,77,79,81,82,83,84,85,86 %N A081606 Numbers having at least one 1 in their ternary representation. %C A081606 Complement of A005823. %C A081606 Integers m such that central Delannoy number A001850(m) == 0 (mod 3). - _Emeric Deutsch_ and _Bruce E. Sagan_, Dec 04 2003 %C A081606 Integers m such that A026375(m) == 0 (mod 3). - _Fabio VisonĂ _, Aug 03 2023 %H A081606 Johann Cigler, <a href="https://arxiv.org/abs/1611.05252">Some elementary observations on Narayana polynomials and related topics</a>, arXiv:1611.05252 [math.CO], 2016. See p.25. %H A081606 Mathematics Stack Exchange, <a href="https://math.stackexchange.com/a/4746447/573047">Proof that integers m in this sequence are such that A026375(m) == 0 (mod 3)</a>. %t A081606 Select[Range[100],DigitCount[#,3,1]>0&] (* _Harvey P. Dale_, Nov 26 2022 *) %o A081606 (Python) %o A081606 from itertools import count, islice %o A081606 def A081606_gen(): # generator of terms %o A081606 a = 0 %o A081606 for n in count(1): %o A081606 b = int(bin(n)[2:],3)<<1 %o A081606 yield from range(a+1,b) %o A081606 a = b %o A081606 A081606_list = list(islice(A081606_gen(),30)) # _Chai Wah Wu_, Oct 13 2023 %o A081606 (Python) %o A081606 from gmpy2 import digits %o A081606 def A081606(n): %o A081606 def f(x): %o A081606 s = digits(x>>1,3) %o A081606 for i in range(l:=len(s)): %o A081606 if s[i]>'1': %o A081606 break %o A081606 else: %o A081606 return n+int(s,2) %o A081606 return n-1+(int(s[:i] or '0',2)+1<<l-i) %o A081606 m, k = n, f(n) %o A081606 while m != k: m, k = k, f(k) %o A081606 return m # _Chai Wah Wu_, Oct 29 2024 %Y A081606 Cf. A007089, A062756, A081609, A081605, A074940. %K A081606 nonn,base %O A081606 1,2 %A A081606 _Reinhard Zumkeller_, Mar 23 2003 %E A081606 More terms from _Emeric Deutsch_ and _Bruce E. Sagan_, Dec 04 2003