login
A positive integer k is included if when k is represented in binary, it contains the binary representations of every distinct prime dividing k as substrings, with overlapping of the substrings allowed (but not necessary).
2

%I #12 Nov 10 2021 07:07:17

%S 2,3,4,5,6,7,8,10,11,12,13,14,16,17,19,20,22,23,24,26,27,28,29,31,32,

%T 34,37,38,40,41,43,44,45,46,47,48,52,53,54,55,56,58,59,61,62,63,64,67,

%U 68,71,73,74,75,76,79,80,82,83,86,88,89,90,92,94,96,97,101,103,104,106,107

%N A positive integer k is included if when k is represented in binary, it contains the binary representations of every distinct prime dividing k as substrings, with overlapping of the substrings allowed (but not necessary).

%C Every integer of the form p*2^k, p = prime, k>=0, is in this sequence. Every integer of the form p*2^k, p = odd prime, is missing from sequence A162721.

%H Amiram Eldar, <a href="/A162722/b162722.txt">Table of n, a(n) for n = 1..10000</a>

%e 20 in binary is 10100. The distinct primes dividing 20 are 2 and 5, which are 10 and 101 in binary. Both 10 and 101 occur in 10100 (with overlapping). So 20 is in this sequence.

%t q[n_] := AllTrue[FactorInteger[n][[;; , 1]], StringContainsQ[IntegerString[n, 2], IntegerString[#, 2]] &]; Select[Range[2, 100], q] (* _Amiram Eldar_, Nov 10 2021 *)

%Y Cf. A162721, A123345.

%K base,nonn

%O 1,1

%A _Leroy Quet_, Jul 11 2009

%E Corrected and extended by _Sean A. Irvine_, Dec 14 2009