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 A337582 #38 Oct 03 2020 10:14:01 %S A337582 0,1,2,3,4,5,6,8,9,10,11,12,13,16,17,18,19,20,22,24,25,26,32,33,34,35, %T A337582 36,37,38,40,41,44,48,49,50,52,64,65,66,67,68,69,70,72,74,76,80,81,82, %U A337582 83,88,96,97,98,100,101,104,128,129,130,131,132,133,134,136 %N A337582 Numbers m such that m AND (m*2^k) is zero or a power of 2 for any k > 0 (where AND denotes the bitwise AND operator). %C A337582 For any k > 0, there are A308251(k-1) positive terms with k binary digits. %C A337582 The ones in the binary representation of any term encodes a finite set of nonnegative integers, say S, such that the differences between any two distinct elements of S are all unique. %C A337582 For any m >= 0, m belongs to the sequence iff 2*m belongs to the sequence. %H A337582 Rémy Sigrist, <a href="/A337582/b337582.txt">Table of n, a(n) for n = 1..10000</a> %H A337582 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %e A337582 Regarding 7: %e A337582 - 7 AND 14 = 6, which is neither 0 nor a power of 2, %e A337582 - so 7 does not belong to the sequence. %e A337582 Regarding 13: %e A337582 - we have the following values: %e A337582 k 13 AND (13*2^k) %e A337582 --- --------------- %e A337582 1 2^3 %e A337582 2 2^2 %e A337582 3 2^3 %e A337582 >=4 0 %e A337582 - so 13 belongs to the sequence. %o A337582 (PARI) is(n) = { my (m=n); while (m>>=1, if (hammingweight(bitand(m,n))>1, return (0))); return (1) } %Y A337582 Cf. A308251. %K A337582 nonn,base %O A337582 1,3 %A A337582 _Rémy Sigrist_, Sep 20 2020