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.

This page as a plain text file.
%I A357429 #9 Oct 02 2022 10:32:23
%S A357429 1,48,50,333,438,448,734217,6561081
%N 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.
%e A357429 In base 3, 48 is 1210 and its first divisors are 1, 2 and 3, that is, 1, 2 and 10.
%o A357429 (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)));
%o A357429 (Python)
%o A357429 from sympy import divisors
%o A357429 from sympy.ntheory import digits
%o A357429 def ok(n):
%o A357429     target, s = "".join(map(str, digits(n, 3)[1:])), ""
%o A357429     if target[0] != "1": return False
%o A357429     for d in divisors(n):
%o A357429         s += "".join(map(str, digits(d, 3)[1:]))
%o A357429         if len(s) >= len(target): return s == target
%o A357429         elif not target.startswith(s): return False
%o A357429 print([k for k in range(10**5) if ok(k)]) # _Michael S. Branicky_, Oct 01 2022
%Y A357429 Cf. A175252 (base 10), A357428 (base 2).
%K A357429 nonn,base,more
%O A357429 1,2
%A A357429 _Michel Marcus_, Sep 28 2022