login
A363787
Primitive binary Niven numbers: binary Niven numbers (A049445) that are not twice another binary Niven number.
6
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,2
COMMENTS
Every binary Niven number is of the form m*2^k, where m is a term of this sequence and k >= 0.
Includes all the odd binary Niven numbers (A144302).
This sequence is infinite. E.g., 16^k + 4^k + 1 is a term for all k >= 1.
LINKS
EXAMPLE
6 is a term as 6 is a binary Niven number and 6/2 = 3 is not a binary Niven number.
MATHEMATICA
binNivQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; q[n_] := binNivQ[n] && ! (EvenQ[n] && binNivQ[n/2]); Select[Range[500], q]
PROG
(PARI) isbinniv(n) = !(n % hammingweight(n));
is(n) = isbinniv(n) && !(!(n%2) && isbinniv(n/2));
CROSSREFS
Subsequence of A049445.
Disjoint union of A144302 and A363788.
A363789 is a subsequence.
Cf. A356349 (decimal analog).
Sequence in context: A344882 A344975 A315360 * A315361 A315362 A376927
KEYWORD
nonn,easy,base
AUTHOR
Amiram Eldar, Jun 22 2023
STATUS
approved