A357428 Numbers whose digit representation in base 2 is equal to the digit representation in base 2 of the initial terms of their sets of divisors in increasing order.
1, 6, 52, 63, 222, 2037, 6776, 26896, 124641, 220336192, 222066488
Offset: 1
Examples
In base 2, 6 is 110 and its first divisors are 1 and 2, that is, 1 and 10.
Programs
-
PARI
isok(k) = my(s=[]); fordiv(k, d, s=concat(s, binary(d)); if (fromdigits(s, 2)==k, return(1)); if (fromdigits(s,2)> k, return(0)));
-
Python
from sympy import divisors def ok(n): target, s = bin(n)[2:], "" if target[0] != "1": return False for d in divisors(n): s += bin(d)[2:] 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
Extensions
a(10)-a(11) from Rémy Sigrist, Sep 28 2022
Comments