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.

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

A363790 Numbers k such that k and k+1 are both primitive binary Niven numbers (A363787).

Original entry on oeis.org

115, 155, 204, 284, 355, 395, 404, 555, 564, 595, 675, 804, 835, 846, 1075, 1124, 1164, 1182, 1266, 1315, 1434, 1555, 1604, 1686, 1795, 1938, 2075, 2124, 2195, 2244, 2315, 2324, 2358, 2435, 2595, 3084, 3204, 3282, 3366, 4124, 4195, 4206, 4235, 4244, 4364, 4458
Offset: 1

Views

Author

Amiram Eldar, Jun 22 2023

Keywords

Examples

			115 is a term since 115 and 116 are both primitive binary Niven numbers.
		

Crossrefs

Subsequence of A049445, A330931 and A363787.
Subsequences: A363791, A363792.

Programs

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

A363791 Starts of runs of 3 consecutive integers that are primitive binary Niven numbers (A363787).

Original entry on oeis.org

4184046, 5234670, 6285294, 7861230, 8123886, 8255214, 8255215, 8320878, 8353710, 8370126, 8379247, 12238830, 12451631, 12572622, 13623246, 13629935, 14515182, 14646510, 14673870, 14673871, 14679342, 15040494, 15335375, 15449071, 15531759, 15708078, 15986543, 16178670
Offset: 1

Views

Author

Amiram Eldar, Jun 22 2023

Keywords

Examples

			4184046 is a term since 4184046, 4184047 and 4184048 are all primitive binary Niven numbers.
		

Crossrefs

Subsequence of A049445, A330931, A330932, A363787 and A363790.
A363792 is a subsequence.

Programs

  • Mathematica
    binNivQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; primBinNivQ[n_] := binNivQ[n] && ! (EvenQ[n] && binNivQ[n/2]);
    seq[kmax_] := Module[{tri = primBinNivQ /@ Range[3], s = {}, k = 4}, While[k < kmax, If[And @@ tri, AppendTo[s, k - 3]]; tri = Join[Rest[tri], {primBinNivQ[k]}]; k++]; s]; seq[10^7]
  • PARI
    isbinniv(n) = !(n % hammingweight(n));
    isprim(n) = isbinniv(n) && !(!(n%2) && isbinniv(n/2));
    lista(kmax) = {my(tri = vector(3, i, isprim(i)), k = 4); while(k < kmax, if(vecsum(tri) == 3, print1(k-3, ", ")); tri = concat(vecextract(tri, "^1"), isprim(k)); k++); }

A363792 Starts of runs of 4 consecutive integers that are primitive binary Niven numbers (A363787).

Original entry on oeis.org

8255214, 14673870, 29092590, 33185646, 41743854, 47697390, 48069486, 56348622, 56999790, 58116078, 59604462, 60534702, 60813774, 61837038, 62581230, 64069614, 64999854, 65371950, 66581262, 66674286, 75232494, 83418606, 86767470, 88069806, 92255886, 95418702, 96441966, 99511758, 99604782
Offset: 1

Views

Author

Amiram Eldar, Jun 22 2023

Keywords

Comments

There are no runs of 5 or more consecutive integers that are primitive binary Niven numbers (see the second comment in A330933).

Examples

			8255214 is a term since 8255214, 8255215, 8255216 and 8255217 are all primitive binary Niven numbers.
		

Crossrefs

Programs

  • Mathematica
    binNivQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; primBinNivQ[n_] := binNivQ[n] && ! (EvenQ[n] && binNivQ[n/2]);
    seq[kmax_] := Module[{quad = primBinNivQ /@ Range[4], s = {}, k = 5}, While[k < kmax, If[And @@ quad, AppendTo[s, k - 4]]; quad = Join[Rest[quad], {primBinNivQ[k]}]; k++]; s]; seq[3*10^7]
  • PARI
    isbinniv(n) = !(n % hammingweight(n));
    isprim(n) = isbinniv(n) && !(!(n%2) && isbinniv(n/2));
    lista(kmax) = {my(quad = vector(4, i, isprim(i)), k = 5); while(k < kmax, if(vecsum(quad) == 4, print1(k-4, ", ")); quad = concat(vecextract(quad, "^1"), isprim(k)); k++); }

A363789 a(n) is the smallest primitive binary Niven number (A363787) whose binary representation is ending with n zeros.

Original entry on oeis.org

1, 6, 60, 2040, 1048560, 137438953440, 1180591620717411303360, 43556142965880123323311949751266331066240, 29642774844752946028434172162224104410437116074403984394101141506025761187823360
Offset: 0

Views

Author

Amiram Eldar, Jun 22 2023

Keywords

Comments

The least term k of A363787 such that A007814(k) = n.
Also, the least binary Niven number (A049445) with a binary weight (A000120) that equals 2^n.
The next term, a(9) = 6.864... * 10^156, is too long to include in the Data section.

Crossrefs

Subsequence of A049445, A143115 and A363787.
Cf. A000120, A007814, A066524, A358256 (decimal analog).

Programs

  • Mathematica
    a[n_] := (2^(2^n)-1) * 2^n; Array[a, 9, 0]
  • PARI
    a(n) = (2^(2^n)-1) * 2^n;

Formula

a(n) = (2^(2^n)-1) * 2^n = A066524(2^n).
a(n) = A143115(2^n).
Showing 1-5 of 5 results.