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.

A376617 Binary Niven numbers (A049445) k such that m = k/wt(k) and m/wt(m) are also binary Niven numbers, where wt(k) = A000120(k) is the binary weight of k.

Original entry on oeis.org

1, 2, 4, 8, 16, 24, 32, 40, 48, 64, 72, 80, 96, 128, 136, 144, 160, 192, 256, 264, 272, 288, 320, 384, 512, 520, 528, 544, 576, 640, 756, 768, 960, 1024, 1032, 1040, 1056, 1088, 1104, 1152, 1280, 1296, 1380, 1472, 1512, 1536, 1620, 1656, 1728, 1840, 1856, 1920, 1944
Offset: 1

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

Numbers k such that A376615(k) = 0 or A376615(k) >= 4.

Examples

			24 is a term since 24/wt(24) = 12 is an integer, 12/wt(12) = 6 is an integer, and 6/wt(6) = 3 is an integer.
		

Crossrefs

Subsequence of A049445 and A376616.
A000079 is a subsequence.

Programs

  • Mathematica
    q[k_] := Module[{w = DigitCount[k, 2, 1], w2, m, n}, IntegerQ[m = k/w] && Divisible[m, w2 = DigitCount[m, 2, 1]] && Divisible[n = m/w2, DigitCount[n, 2, 1]]]; Select[Range[2000], q]
  • PARI
    s(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + s(n/w)));}
    is(k) = {my(sk = s(k)); sk == 0 || sk >= 4;}