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.

A031944 Numbers in which digits 0,1,2 all occur in base 3.

Original entry on oeis.org

11, 15, 19, 21, 29, 32, 33, 34, 35, 38, 42, 45, 46, 47, 48, 51, 55, 57, 58, 59, 61, 63, 64, 65, 66, 69, 73, 75, 83, 86, 87, 88, 89, 92, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 110, 113, 114, 115, 116, 119, 123, 126, 127, 128, 129, 132, 135
Offset: 1

Views

Author

Keywords

Comments

A043530(a(n)) = 3; complement of A154314. - Reinhard Zumkeller, Jan 07 2009
A212193(a(n)) = 3. - Reinhard Zumkeller, May 04 2012

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a031944 n = a031944_list !! (n-1)
    a031944_list = elemIndices 3 a212193_list
    -- Reinhard Zumkeller, May 04 2012
    
  • Mathematica
    Select[Range[200],Min[DigitCount[#,3]]>0&] (* Harvey P. Dale, Nov 21 2015 *)
  • Python
    from sympy.ntheory import count_digits
    def ok(n): c = count_digits(n, 3); return all(c[d] > 0 for d in [0, 1, 2])
    print([k for k in range(136) if ok(k)]) # Michael S. Branicky, Nov 15 2021