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.

A357429 Numbers whose digit representation in base 3 is equal to the digit representation in base 3 of the initial terms of their sets of divisors in increasing order.

Original entry on oeis.org

1, 48, 50, 333, 438, 448, 734217, 6561081
Offset: 1

Views

Author

Michel Marcus, Sep 28 2022

Keywords

Examples

			In base 3, 48 is 1210 and its first divisors are 1, 2 and 3, that is, 1, 2 and 10.
		

Crossrefs

Cf. A175252 (base 10), A357428 (base 2).

Programs

  • PARI
    isok(k) = my(s=[]); fordiv(k, d, s=concat(s, digits(d, 3)); if (fromdigits(s, 3)==k, return(1)); if (fromdigits(s, 3)> k, return(0)));
    
  • Python
    from sympy import divisors
    from sympy.ntheory import digits
    def ok(n):
        target, s = "".join(map(str, digits(n, 3)[1:])), ""
        if target[0] != "1": return False
        for d in divisors(n):
            s += "".join(map(str, digits(d, 3)[1:]))
            if len(s) >= len(target): return s == target
            elif not target.startswith(s): return False
    print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Oct 01 2022