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.

A355274 Numbers having more even than odd digits when written in base 3.

Original entry on oeis.org

0, 2, 6, 8, 9, 11, 15, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 29, 33, 35, 45, 47, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 69, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 88, 89, 90, 92, 96, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 110, 114, 116
Offset: 1

Views

Author

M. F. Hasler, Jul 03 2022

Keywords

Crossrefs

Cf. A072603 (same in base 2), A352546 (same in base 10).

Programs

  • PARI
    select( {is_A355274(n)=vecsum(n=digits(n,3)%2)*2<#n+!n}, [0..123])
    
  • Python
    from sympy.ntheory import digits
    def ok(n):
        d = digits(n, 3)[1:]
        return len(d) < 2*sum(1 for di in d if di%2 == 0)
    print([k for k in range(117) if ok(k)]) # Michael S. Branicky, Jul 03 2022