OFFSET
1,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
filter:= n -> 2 &^ n - 1 mod convert(convert(n, base, 2), `+`) = 0:
select(filter, [seq(i, i=1..2000, 2)]); # Robert Israel, Jan 13 2019
MATHEMATICA
Join[{1}, Select[Range[3, 2000, 2], PowerMod[2, #, DigitCount[#, 2, 1]] == 1 &]] (* Amiram Eldar, Jun 08 2022 *)
PROG
(PARI) isok(n) = (n % 2) && !((2^n-1) % hammingweight(n)); \\ Michel Marcus, Nov 29 2013
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Benoit Cloitre, Sep 17 2002
STATUS
approved