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.

A345395 Composite numbers whose divisors that are larger than 1 are all digitally balanced numbers in base 2 (A031443).

Original entry on oeis.org

132061, 138421, 151427, 532393, 545269, 546407, 557983, 559609, 568801, 570709, 573193, 579013, 590687, 595853, 599707, 604873, 610777, 624553, 630293, 635213, 2102767, 2105063, 2109383, 2111339, 2123677, 2128187, 2129081, 2129609, 2143961, 2149753, 2151131, 2151661
Offset: 1

Views

Author

Amiram Eldar, Jun 17 2021

Keywords

Comments

The prime numbers with this property are the digitally balanced primes (A066196).
All the terms are odd, since if k is an even digitally balanced number then its divisor k/2 is not digitally balanced (since it has one fewer 0 in its binary expansion).
Apparently most of the terms are semiprimes (A001358) with 4 divisors.
Terms with 3 divisors, i.e., squares of primes: 145178401 = 12049^2, 155575729 = 12473^2, ...
The least term with more than 4 divisors is 8897396239 = 163 * 929 * 58757, with 8 divisors.
The least term with 6 divisors is 8923691369 = 41 * 14753^2.

Examples

			132061 is a term since its divisors that are larger than 1 are {41, 3221, 132061}, and their binary representations are {101001, 110010010101, 100000001111011101}. Each one has an equal number of 0's and 1's.
		

Crossrefs

Subsequence of A031443.
Cf. A066196.

Programs

  • Mathematica
    balQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ @ (m = Length @ d) && Count[d, 1] == m/2]; Select[Range[9,10^6,2], CompositeQ[#] && AllTrue[Rest@Divisors[#], balQ] &]
  • PARI
    isbal(k) = exponent(k) + 1 == 2 * hammingweight(k);
    isok(k) = if(k == 1 || isprime(k), 0, fordiv(k, d, if(d > 1 && !isbal(d), return(0))); 1); \\ Amiram Eldar, Jul 03 2025