login
Numbers that can be written as the product of two divisors greater than 1 such that the number in binary is contained in the string concatenation of the divisors in binary.
4

%I #15 Jul 27 2022 16:36:19

%S 6,10,12,14,24,28,30,36,42,48,56,57,60,62,96,112,120,124,126,136,170,

%T 192,224,240,248,252,254,292,355,384,448,480,496,504,508,510,528,682,

%U 737,768,896,921,960,992,1008,1016,1020,1022,1536,1792,1920,1984,2016,2032,2040,2044,2046,2080,2184,2340

%N Numbers that can be written as the product of two divisors greater than 1 such that the number in binary is contained in the string concatenation of the divisors in binary.

%H Scott R. Shannon, <a href="/A355791/a355791.txt">Divisor product of the first 417 terms</a>. These are all the numbers up to 100000000.

%e 6 is a term as 6 = 110_2 = 3 * 2 = 11_2 * 10_2 and "11" + "10" = "1110" contains "110".

%e 2340 is a term as 2340 = 100100100100_2 = 4 * 585 = 100_2 * 1001001001_2 and "100" + "1001001001" contains "100100100100".

%e See the attached text file for other examples.

%t q[n_] := AnyTrue[Rest @ Most @ Divisors[n], StringContainsQ[StringJoin @@ IntegerString[{#, n/#}, 2], IntegerString[n, 2]] &]; Select[Range[2, 2500], q] (* _Amiram Eldar_, Jul 27 2022 *)

%o (Python)

%o from sympy import divisors

%o def ok(n):

%o b, divs = bin(n)[2:], divisors(n)[1:-1]

%o return any(b in bin(d)[2:]+bin(n//d)[2:] for d in divs)

%o print([k for k in range(1, 2400) if ok(k)]) # _Michael S. Branicky_, Jul 27 2022

%Y Cf. A355790 (base-10), A355852, A355857, A030190, A355852, A210959, A027750.

%K nonn,base

%O 1,1

%A _Scott R. Shannon_, Jul 17 2022