cp's OEIS Frontend

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.

A081606 Numbers having at least one 1 in their ternary representation.

Original entry on oeis.org

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, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 75, 76, 77, 79, 81, 82, 83, 84, 85, 86
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 23 2003

Keywords

Comments

Complement of A005823.
Integers m such that central Delannoy number A001850(m) == 0 (mod 3). - Emeric Deutsch and Bruce E. Sagan, Dec 04 2003
Integers m such that A026375(m) == 0 (mod 3). - Fabio VisonĂ , Aug 03 2023

Crossrefs

Programs

  • Mathematica
    Select[Range[100],DigitCount[#,3,1]>0&] (* Harvey P. Dale, Nov 26 2022 *)
  • Python
    from itertools import count, islice
    def A081606_gen(): # generator of terms
        a = 0
        for n in count(1):
            b = int(bin(n)[2:],3)<<1
            yield from range(a+1,b)
            a = b
    A081606_list = list(islice(A081606_gen(),30)) # Chai Wah Wu, Oct 13 2023
    
  • Python
    from gmpy2 import digits
    def A081606(n):
        def f(x):
            s = digits(x>>1,3)
            for i in range(l:=len(s)):
                if s[i]>'1':
                    break
            else:
                return n+int(s,2)
            return n-1+(int(s[:i] or '0',2)+1<Chai Wah Wu, Oct 29 2024

Extensions

More terms from Emeric Deutsch and Bruce E. Sagan, Dec 04 2003