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-2 of 2 results.

A380844 The number of divisors of n that have the same binary weight as n.

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 1, 4, 2, 2, 1, 3, 1, 2, 1, 5, 1, 4, 1, 3, 2, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 2, 2, 2, 6, 1, 2, 1, 4, 1, 4, 1, 3, 2, 2, 1, 5, 2, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 7, 2, 4, 1, 3, 1, 4, 1, 8, 1, 2, 2, 3, 1, 2, 1, 5, 1, 2, 1, 6, 1, 2, 1
Offset: 1

Views

Author

Amiram Eldar, Feb 05 2025

Keywords

Comments

First differs from A325565 at n = 133: a(133) = 3 while A325565(133) = 2.
The sum of these divisors is A380845(n).

Examples

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

Crossrefs

Programs

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

Formula

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

A324393 a(n) is the number of such divisors d of n that A000120(d) does not divide n, where A000120(d) gives the binary weight of d.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 2, 1, 0, 2, 2, 3, 3, 1, 2, 1, 0, 2, 0, 3, 0, 1, 2, 2, 0, 1, 0, 1, 3, 5, 2, 1, 0, 2, 2, 3, 3, 1, 2, 2, 4, 2, 2, 1, 0, 1, 2, 3, 0, 3, 0, 1, 0, 2, 4, 1, 0, 1, 2, 4, 3, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 3, 4, 1, 4, 3, 0, 3, 2, 3, 0, 1, 4, 4, 3, 1, 2, 1, 4, 4
Offset: 1

Views

Author

Antti Karttunen, Mar 05 2019

Keywords

Comments

Number of such positive integers k that divide n but A000120(k) [the Hamming weight of k] does not divide n.

Crossrefs

Cf. A000005, A000120, A324392, A306263 (positions of zeros).

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 1 &, !Divisible[n, DigitCount[#, 2, 1]] &]; Array[a, 100] (* Amiram Eldar, Dec 04 2020 *)
  • PARI
    A324393(n) = sumdiv(n, d, !!(n%hammingweight(d)));

Formula

a(n) = Sum_{d|n} [A000120(d) does not divide n], where [ ] is the Iverson bracket.
a(n) = A000005(n) - A324392(n).
a(p) = 1 for all odd primes p.
Showing 1-2 of 2 results.