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.

A081605 Numbers having at least one 0 in their ternary representation.

Original entry on oeis.org

0, 3, 6, 9, 10, 11, 12, 15, 18, 19, 20, 21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 45, 46, 47, 48, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 69, 72, 73, 74, 75, 78, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 23 2003

Keywords

Comments

Complement of A032924.
A212193(a(n)) <> 0. [Reinhard Zumkeller, May 04 2012]

Crossrefs

Programs

  • Haskell
    import Data.List (findIndices)
    a081605 n = a081605_list !! (n-1)
    a081605_list = findIndices (/= 0) a212193_list
    -- Reinhard Zumkeller, May 04 2012
    
  • Mathematica
    Select[Range[0,100],DigitCount[#,3,0]>0&] (* Harvey P. Dale, Aug 10 2021 *)
  • Python
    from itertools import count, islice
    def A081605_gen(): # generator of terms
        a = -1
        for n in count(2):
            b = int(bin(n)[3:],3) + (3**(n.bit_length()-1)-1>>1)
            yield from range(a+1,b)
            a = b
    A081605_list = list(islice(A081605_gen(),30)) # Chai Wah Wu, Oct 13 2023