A345395 Composite numbers whose divisors that are larger than 1 are all digitally balanced numbers in base 2 (A031443).
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
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
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
Comments