A162722 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, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 19, 20, 22, 23, 24, 26, 27, 28, 29, 31, 32, 34, 37, 38, 40, 41, 43, 44, 45, 46, 47, 48, 52, 53, 54, 55, 56, 58, 59, 61, 62, 63, 64, 67, 68, 71, 73, 74, 75, 76, 79, 80, 82, 83, 86, 88, 89, 90, 92, 94, 96, 97, 101, 103, 104, 106, 107
Offset: 1
Examples
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
q[n_] := AllTrue[FactorInteger[n][[;; , 1]], StringContainsQ[IntegerString[n, 2], IntegerString[#, 2]] &]; Select[Range[2, 100], q] (* Amiram Eldar, Nov 10 2021 *)
Extensions
Corrected and extended by Sean A. Irvine, Dec 14 2009
Comments