A363787 Primitive binary Niven numbers: binary Niven numbers (A049445) that are not twice another binary Niven number.
1, 6, 10, 18, 21, 34, 55, 60, 66, 69, 81, 92, 108, 115, 116, 126, 130, 155, 156, 172, 180, 185, 204, 205, 212, 222, 228, 246, 258, 261, 273, 284, 285, 295, 300, 308, 318, 321, 332, 340, 345, 355, 356, 366, 378, 395, 396, 404, 405, 414, 420, 425, 438, 452, 462
Offset: 1
Examples
6 is a term as 6 is a binary Niven number and 6/2 = 3 is not a binary Niven number.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
binNivQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; q[n_] := binNivQ[n] && ! (EvenQ[n] && binNivQ[n/2]); Select[Range[500], q]
-
PARI
isbinniv(n) = !(n % hammingweight(n)); is(n) = isbinniv(n) && !(!(n%2) && isbinniv(n/2));
Comments