A074203 Odd numbers k such that the number of 1's in the binary representation of k divides 2^k-1.
1, 351, 375, 381, 471, 477, 501, 687, 699, 747, 855, 861, 885, 939, 981, 1119, 1143, 1149, 1239, 1245, 1269, 1311, 1335, 1341, 1359, 1371, 1383, 1389, 1395, 1401, 1431, 1437, 1461, 1479, 1485, 1491, 1497, 1509, 1521, 1623, 1629, 1653, 1707, 1749, 1815
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
PARI
isok(n) = (n % 2) && !((2^n-1) % hammingweight(n)); \\ Michel Marcus, Nov 29 2013
Comments