This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A175381 #29 May 09 2025 01:47:43 %S A175381 1,2,3,4,6,8,10,12,16,20,24,32,36,40,48,64,72,80,96,128,136,144,160, %T A175381 192,256,272,288,320,384,512,528,544,576,640,768,1024,1056,1088,1152, %U A175381 1280,1536,2048,2080,2112,2176,2304,2560,3072,4096,4160,4224,4352,4608 %N A175381 A positive integer k is included if all positive integers that, when written in binary, occur as substrings in binary k divide k. %C A175381 This is the complement of sequence A175382. %C A175381 This sequence is infinite (because it contains all powers of 2). %C A175381 The union of powers of 2 and numbers of the form 2^n + 2^k, where floor(n/2) <= k < n. - _Ivan Neretin_, Nov 24 2016 %H A175381 Ivan Neretin, <a href="/A175381/b175381.txt">Table of n, a(n) for n = 1..10000</a> %e A175381 20 in binary is 10100. The positive integers that, when written in binary, occur as substrings in 10100 are: 1 (1 in binary), 2 (10 in binary), 4 (100 in binary), 5 (101 in binary), 10 (1010 in binary), and 20 (10100 in binary.) Since 1, 2, 4, 5, 10, and 20 each are a divisor of 20, then 20 is in this sequence. %t A175381 mx = 12; Union[2^Range[0, mx], Flatten@Table[2^n + 2^k, {n, 0, mx}, {k, Quotient[n, 2], n - 1}]] (* _Ivan Neretin_, Nov 24 2016 *) %o A175381 (Python) %o A175381 def ok(n): %o A175381 s = bin(n)[2:] %o A175381 subs = (s[i:j] for i in range(len(s)) for j in range(i+1, len(s)+1) if s[i]!='0') %o A175381 return n and all(n%v == 0 for ss in subs if (v:=int(ss, 2)) > 0) %o A175381 print([k for k in range(5000) if ok(k)]) # _Michael S. Branicky_, May 09 2025 %Y A175381 Cf. A175382. %K A175381 base,nonn %O A175381 1,2 %A A175381 _Leroy Quet_, Apr 24 2010 %E A175381 Spelling corrected by _Jason G. Wurtzel_, Sep 04 2010 %E A175381 a(11)-a(53) from _Lars Blomberg_, May 05 2011