cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A363787 Primitive binary Niven numbers: binary Niven numbers (A049445) that are not twice another binary Niven number.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Jun 22 2023

Keywords

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.

Examples

			6 is a term as 6 is a binary Niven number and 6/2 = 3 is not a binary Niven number.
		

Crossrefs

Subsequence of A049445.
Disjoint union of A144302 and A363788.
A363789 is a subsequence.
Cf. A356349 (decimal analog).

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));