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.

Showing 1-5 of 5 results.

A376618 Odd binary Niven numbers (A144302) k such that k/wt(k) is also an odd binary Niven number, where wt(k) = A000120(k) is the binary weight of k.

Original entry on oeis.org

1, 345, 405, 775, 1305, 1425, 1435, 1605, 2125, 2325, 2485, 2765, 2825, 4235, 4305, 4459, 4655, 4725, 5085, 5145, 5607, 5625, 5929, 6223, 6405, 7515, 7623, 8145, 10625, 11151, 11835, 12325, 12355, 12425, 13527, 13825, 13995, 14805, 16695, 18445, 20505, 20625, 20925
Offset: 1

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

If m is a term then 2^k * m is a term of A376616 for all k >= 0.

Examples

			345 is a term since it is odd, 345/wt(345) = 69 is an integer, and 69/wt(69) = 23 is an integer.
		

Crossrefs

Intersection of A005408 and A376616.
Subsequence of A049445 and A144302.
Cf. A000120.

Programs

  • Mathematica
    q[k_] := Module[{w = DigitCount[k, 2, 1]}, Divisible[k, w] && Divisible[k/w, DigitCount[k/w, 2, 1]]]; Select[Range[1, 21000, 2], q]
  • PARI
    is(k) = if(!(k % 2), 0, my(w = hammingweight(k)); !(k % w) && !((k/w) % hammingweight(k/w)));

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

A363788 Even primitive binary Niven numbers: even terms of A363787.

Original entry on oeis.org

6, 10, 18, 34, 60, 66, 92, 108, 116, 126, 130, 156, 172, 180, 204, 212, 222, 228, 246, 258, 284, 300, 308, 318, 332, 340, 356, 366, 378, 396, 404, 414, 420, 438, 452, 462, 474, 486, 498, 514, 540, 556, 564, 588, 596, 606, 612, 630, 652, 660, 676, 708, 726, 780
Offset: 1

Views

Author

Amiram Eldar, Jun 22 2023

Keywords

Comments

The odd terms of A363787 are all the odd binary Niven numbers (A144302).
This sequence is infinite. E.g., A052548(k) = 2^k + 2 is a term for all k >= 2.

Crossrefs

Subsequence of A049445 and A363787.
Equals A363787 \ A144302.
Cf. A052548, A358255 (decimal analog).

Programs

  • Mathematica
    binNivQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; q[n_] := binNivQ[n] && ! (EvenQ[n] && binNivQ[n/2]); Select[Range[2, 1000, 2], q]
  • PARI
    isbinniv(n) = !(n % hammingweight(n));
    is(n) = !(n%2) && isbinniv(n) && !isbinniv(n/2);

A376619 a(n) is the least odd number k such that A376615(k) = n, or -1 if no such number exists.

Original entry on oeis.org

3, 21, 345, 10625, 74375, 860625, 84189105, 1599592995, 23993894925
Offset: 1

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

Without the restriction to odd numbers the corresponding sequence is 3*2^(n-1) = A007283(n-1).
All the terms above 3 are odd binary Niven numbers (A144302).
a(10) > 10^13, if it exists.

Examples

			  n | The n iterations
  --+------------------------------------------------------
  1 | 3 -> 3/2
  2 | 21 -> 7 -> 7/3
  3 | 345 -> 69 -> 23 -> 23/4
  4 | 10625 -> 2125 -> 425 -> 85 -> 85/4
  5 | 74375 -> 10625 -> 2125 -> 425 -> 85 -> 85/4
  6 | 860625 -> 95625 -> 10625 -> 2125 -> 425 -> 85 -> 85/4
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = Module[{bw = DigitCount[n, 2, 1]}, If[bw == 1, 0, If[!Divisible[n, bw], 1, 1 + s[n/bw]]]]; seq[len_] := Module[{v = Table[0, {len}], c = 0, k = 3, i}, While[c < len, i = s[k]; If[v[[i]] == 0, c++; v[[i]] = k]; k += 2]; v]; seq[5]
  • PARI
    s(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + s(n/w)));}
    lista(len) = {my(v = vector(len), c = 0, k = 3, i); while(c < len, i = s(k); if(v[i] == 0, c++; v[i] = k); k += 2); v;}

A152567 Numbers k such that A049445(k) is odd.

Original entry on oeis.org

1, 11, 19, 24, 27, 33, 43, 51, 54, 68, 71, 74, 76, 83, 89, 90, 98, 101, 107, 117, 130, 135, 138, 144, 151, 153, 156, 163, 165, 178, 181, 188, 195, 199, 203, 205, 207, 212, 215, 226, 230, 235, 238, 244, 249, 251, 258, 267, 272, 278, 282, 285, 294, 298, 304, 305, 325, 327
Offset: 1

Views

Author

Roger L. Bagula, Dec 07 2008

Keywords

Crossrefs

Programs

Extensions

Edited by N. J. A. Sloane, Dec 07 2008
Showing 1-5 of 5 results.