|
|
A355791
|
|
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
|
|
|
6, 10, 12, 14, 24, 28, 30, 36, 42, 48, 56, 57, 60, 62, 96, 112, 120, 124, 126, 136, 170, 192, 224, 240, 248, 252, 254, 292, 355, 384, 448, 480, 496, 504, 508, 510, 528, 682, 737, 768, 896, 921, 960, 992, 1008, 1016, 1020, 1022, 1536, 1792, 1920, 1984, 2016, 2032, 2040, 2044, 2046, 2080, 2184, 2340
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
6 is a term as 6 = 110_2 = 3 * 2 = 11_2 * 10_2 and "11" + "10" = "1110" contains "110".
2340 is a term as 2340 = 100100100100_2 = 4 * 585 = 100_2 * 1001001001_2 and "100" + "1001001001" contains "100100100100".
See the attached text file for other examples.
|
|
MATHEMATICA
|
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 *)
|
|
PROG
|
(Python)
from sympy import divisors
def ok(n):
b, divs = bin(n)[2:], divisors(n)[1:-1]
return any(b in bin(d)[2:]+bin(n//d)[2:] for d in divs)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|