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.

A376045 Complement of A325112.

Original entry on oeis.org

3, 6, 9, 12, 13, 15, 16, 18, 19, 21, 23, 24, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 45, 46, 48, 49, 51, 53, 54, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 75, 76, 78, 79, 81, 83, 84, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 102, 103, 105, 106, 108
Offset: 1

Views

Author

N. J. A. Sloane, Sep 09 2024

Keywords

Comments

Numbers missing from A325112.
Equivalently, numbers whose decimal expansion has a subsequence which is divisible by 3.

Crossrefs

Cf. A325112.

Programs

  • Python
    from itertools import combinations
    def A376045(n):
        def f(x):
            c, l = 0, len(str(x))
            for i in range(l):
                k = 10**i
                for j in (1,2,4,5,7,8):
                    if j*k<=x:
                        c += 1
            for a in combinations((10**i for i in range(l)),2):
                for b in ((1, 1), (1, 4), (1, 7), (2, 2), (2, 5), (2, 8), (4, 1), (4, 4), (4, 7), (5, 2), (5, 5), (5, 8), (7, 1), (7, 4), (7, 7), (8, 2), (8, 5), (8, 8)):
                    if a[0]*b[0]+a[1]*b[1] <= x:
                        c += 1
            return n+c
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Sep 10 2024