OFFSET
1,2
COMMENTS
Odd terms (1, 351, 375, ...) are in A074203.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Range[300], (d = DigitCount[#, 2, 1]) == 1 || PowerMod[2, #, d] == 1 &] (* Amiram Eldar, Jul 30 2020 *)
PROG
(PARI) isok(n) = !((2^n-1) % hammingweight(n)); \\ Michel Marcus, Nov 29 2013
(Python)
from itertools import count, islice
def A074202_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:not ((1<<n)-1) % n.bit_count(), count(max(startvalue, 1)))
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Benoit Cloitre, Sep 17 2002
EXTENSIONS
Edited by N. J. A. Sloane, May 10 2007
STATUS
approved