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.

A380845 The sum of divisors of n that have the same binary weight as n.

Original entry on oeis.org

1, 3, 3, 7, 5, 9, 7, 15, 12, 15, 11, 21, 13, 21, 15, 31, 17, 36, 19, 35, 28, 33, 23, 45, 25, 39, 27, 49, 29, 45, 31, 63, 36, 51, 42, 84, 37, 57, 39, 75, 41, 84, 43, 77, 60, 69, 47, 93, 56, 75, 51, 91, 53, 81, 55, 105, 57, 87, 59, 105, 61, 93, 63, 127, 70, 108
Offset: 1

Views

Author

Amiram Eldar, Feb 05 2025

Keywords

Comments

The number of these divisors is A380844(n).

Examples

			a(6) = 9 because 6 = 110_2 has binary weight 2, 2 of its divisors, 3 = 11_2 and 6, have the same binary weight, and 3 + 6 = 9.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{h = DigitCount[n, 2, 1]}, DivisorSum[n, # &, DigitCount[#, 2, 1] == h &]]; Array[a, 100]
  • PARI
    a(n) = {my(h = hammingweight(n)); sumdiv(n, d, d * (hammingweight(d) == h));}

Formula

a(n) = Sum_{d|n} d * [A000120(d) = A000120(n)], where [ ] is the Iverson bracket.
a(2^n) = 2^(n+1) - 1.
a(n) <= A000203(n) with equality if and only if n is a power of 2.
a(n) = a(A000265(n)) * (2^(A007814(n)+1)-1) = a(A000265(n)) * A038712(n), or equivalently, a(k*2^n) = a(k)*(2^(n+1)-1) for k odd and n >= 0.
In particular, since a(p) = p for an odd prime p, a(p*2^n) = p*(2^(n+1)-1) for an odd prime p and n >= 0.
a(A000396(n)) = A000668(n)^2, assuming that odd perfect numbers do no exist.

A383363 Composite numbers k all of whose proper divisors have binary weights that are not equal to the binary weight of k.

Original entry on oeis.org

15, 25, 27, 39, 51, 55, 57, 63, 69, 77, 81, 85, 87, 91, 95, 99, 111, 115, 117, 119, 121, 123, 125, 141, 143, 145, 147, 159, 169, 171, 175, 177, 183, 185, 187, 201, 203, 205, 207, 209, 213, 215, 219, 221, 231, 235, 237, 243, 245, 247, 249, 253, 255, 261, 265, 275
Offset: 1

Views

Author

Amiram Eldar, Apr 24 2025

Keywords

Comments

First differs from A325571 at n = 56: A325571(56) = 267 is not a term of this sequence. Differs from A325571 by having the terms 16849, 35235, 101265, 268357, 295717, ..., and not having the terms 267, 295, 327, 387, 395, ... .
Composite numbers k such that A380844(k) = 1.
All the odd primes p have A380844(p) = 1.
All the terms are odd numbers since for an even number k, A000120(k) = A000120(k/2).

Examples

			15 = 3 * 5 is a term since it is composite, and its binary weight, A000120(15) = 4 is different from the binary weights of its proper divisors: A000120(1) = 1, A000120(3) = 2, and A000120(5) = 2.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := CompositeQ[k] && DivisorSum[k, 1 &, DigitCount[#, 2, 1] == DigitCount[k, 2, 1] &] == 1; Select[Range[1, 300, 2], q]
  • PARI
    isok(k) = if(k == 1 || isprime(k), 0, my(h = hammingweight(k)); sumdiv(k, d, hammingweight(d) == h) == 1);

A383364 a(n) is the least number k with exactly n proper divisors, where all of them have binary weights that are different from the binary weight of k.

Original entry on oeis.org

1, 3, 25, 15, 81, 63, 15625, 231, 1225, 405, 59049, 495, 531441, 5103, 2025, 1485, 33232930569601, 2475, 3814697265625, 6237, 18225, 295245, 31381059609, 4095, 1500625, 2657205, 81225, 25515, 22876792454961, 14175, 931322574615478515625, 21735, 31236921, 301327047
Offset: 0

Views

Author

Amiram Eldar, Apr 24 2025

Keywords

Examples

			a(0) = 1 since 1 has no proper divisors.
a(1) = 3 since 3 has one proper divisor, 1, and A000120(1) = 1 != A000120(3) = 2, while 2 also has one proper divisor, 1, but A000120(2) = A000120(1) = 1.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := DivisorSum[k, 1 &, DigitCount[#, 2, 1] == DigitCount[k, 2, 1] &] == 1; seq[len_] := Module[{s = Table[0, {len}], c = 0, k = 1, i}, While[c < len, i = DivisorSigma[0, k]; If[i <= len && s[[i]] == 0 && q[k], c++; s[[i]] = k]; k++]; s]; seq[16]
  • PARI
    is1(k) = {my(h = hammingweight(k)); sumdiv(k, d, hammingweight(d) == h) ==  1};
    list(len) = {my(s = vector(len), c = 0, k = 1, i); while(c < len, i = numdiv(k); if(i <= len && s[i] == 0 && is1(k), c++; s[i] = k); k++); s;}

A383365 Numbers k with a record number of proper divisors, where all of them have binary weights that are different from the binary weight of k.

Original entry on oeis.org

1, 3, 15, 63, 231, 405, 495, 1485, 2475, 4095, 14175, 21735, 24255, 31185, 79695, 190575, 218295, 239085, 294525, 904365, 1276275, 2789325, 3586275, 4937625, 6912675, 10072755, 17342325, 17972955, 26801775, 46621575, 80405325, 192567375, 326351025, 333107775, 654729075
Offset: 1

Views

Author

Amiram Eldar, Apr 24 2025

Keywords

Comments

The corresponding record values are 0, 1, 3, 5, 7, 9, 11, 15, 17, ... (see the link for more values).
All terms are odd as an even number k has proper divisor k/2 with the same binary weight. - David A. Corneth, Apr 24 2025

Examples

			a(1) = 1 since 1 has no proper divisors.
a(2) = 3 since 3 has one proper divisor, 1, and A000120(1) = 1 != A000120(3) = 2, while 2 also has one proper divisor, 1, but A000120(2) = A000120(1) = 1.
a(3) = 15 since 15 has 3 proper divisors, 1, 3 and 5, and A000120(1) = 1 and A000120(3) = A000120(5) = 2 are different from A000120(15) = 4. All the numbers below 15 have fewer proper divisors with this property.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := DivisorSum[k, 1 &, DigitCount[#, 2, 1] == DigitCount[k, 2, 1] &] == 1; seq[kmax_] := Module[{s = {}, d, dm = 0}, Do[d = DivisorSigma[0, k]; If[d > dm && q[k], dm = d; AppendTo[s, k]], {k, 1, kmax}]; s]; seq[10^5]
  • PARI
    is1(k) = {my(h = hammingweight(k)); sumdiv(k, d, hammingweight(d) == h) ==  1};
    list(kmax) = {my(d, dm = 0); for(k = 1, kmax, d = numdiv(k); if(d > dm && is1(k), dm = d; print1(k, ", ")));}

A381069 Numbers k that have a record number of divisors that have the same binary weight as k.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 72, 144, 288, 576, 1080, 2160, 4320, 8640, 17280, 34560, 69120, 99360, 136080, 198720, 272160, 397440, 529200, 544320, 1058400, 2116800, 3160080, 4233600, 6320160, 8467200, 12640320, 16934400, 25280640, 50561280, 76744800, 101122560, 102816000
Offset: 1

Views

Author

Amiram Eldar, Feb 12 2025

Keywords

Comments

Indices of records of A380844, i.e., numbers k such that A380844(k) > A380844(m) for all m < k.
This sequence is infinite since A380844 is unbounded (e.g., A380844(2^n) = n+1).
Analogous to highly composite numbers (A002182) with the number of divisors with the same binary weight (A380844) instead of the number of divisors (A000005).
The corresponding record values are 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, ... (see the link for more values).

Crossrefs

Programs

  • Mathematica
    seq[lim_] := Module[{h, d, dmax = 0, s = {}}, Do[h = DigitCount[k, 2, 1]; d = DivisorSum[k, 1 &, DigitCount[#, 2, 1] == h &]; If[d > dmax, dmax = d; AppendTo[s, k]], {k, 1, lim}]; s]; seq[10^5]
  • PARI
    list(lim) = {my(h, d, dmax = 0); for(k = 1, lim, h = hammingweight(k); d = sumdiv(k, d, hammingweight(d) == h); if(d > dmax, dmax = d; print1(k, ", ")));}
Showing 1-5 of 5 results.