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 A074202 #21 Mar 09 2023 16:52:46 %S A074202 1,2,4,8,14,16,22,26,28,32,38,42,44,50,52,56,64,70,74,76,82,84,88,98, %T A074202 100,104,112,124,128,134,138,140,146,148,152,162,164,168,176,188,194, %U A074202 196,200,208,220,224,236,244,248,256,262,266,268,274,276,280,290,292 %N A074202 Numbers k such that the number of 1's in the binary expansion of k divides 2^k-1. %C A074202 Odd terms (1, 351, 375, ...) are in A074203. %H A074202 Amiram Eldar, <a href="/A074202/b074202.txt">Table of n, a(n) for n = 1..10000</a> %t A074202 Select[Range[300], (d = DigitCount[#, 2, 1]) == 1 || PowerMod[2, #, d] == 1 &] (* _Amiram Eldar_, Jul 30 2020 *) %o A074202 (PARI) isok(n) = !((2^n-1) % hammingweight(n)); \\ _Michel Marcus_, Nov 29 2013 %o A074202 (Python) %o A074202 from itertools import count, islice %o A074202 def A074202_gen(startvalue=1): # generator of terms >= startvalue %o A074202 return filter(lambda n:not ((1<<n)-1) % n.bit_count(), count(max(startvalue,1))) %o A074202 A074202_list = list(islice(A074202_gen(),20)) # _Chai Wah Wu_, Mar 09 2023 %Y A074202 Cf. A000120, A000225, A074203, A074293. %Y A074202 Different from A128309. %K A074202 base,easy,nonn %O A074202 1,2 %A A074202 _Benoit Cloitre_, Sep 17 2002 %E A074202 Edited by _N. J. A. Sloane_, May 10 2007