login
Semiprimes whose prime factors have an equal number of digits in binary representation.
8

%I #32 Jul 07 2023 18:57:12

%S 4,6,9,25,35,49,121,143,169,289,323,361,391,437,493,527,529,551,589,

%T 667,713,841,899,961,1369,1517,1591,1681,1739,1763,1849,1927,1961,

%U 2021,2173,2183,2209,2257,2279,2419,2491,2501,2537,2623,2773,2809

%N Semiprimes whose prime factors have an equal number of digits in binary representation.

%C A138510(A174956(a(n))) <= 2. - _Reinhard Zumkeller_, Dec 19 2014

%H Reinhard Zumkeller, <a href="/A085721/b085721.txt">Table of n, a(n) for n = 1..1000</a>

%H Dario A. Alpern, <a href="https://www.alpertron.com.ar/BRILLIANT.HTM">Brilliant Numbers</a>.

%e A078972(35) = 527 = 17*31 -> 10001*11111, therefore 527 is a term;

%e A078972(37) = 533 = 13*41 -> 1101*101001, therefore 533 is not a term;

%e A001358(1920) = 7169 = 67*107 -> 1000011*1101011: therefore 7169 a term, but not of A078972.

%t fQ[n_] := Block[{fi = FactorInteger@ n}, Plus @@ Last /@ fi == 2 && IntegerLength[ fi[[1, 1]], 2] == IntegerLength[ fi[[-1, 1]], 2]]; Select[ Range@ 2866, fQ] (* _Robert G. Wilson v_, Oct 29 2011 *)

%t Select[Range@ 3000, And[Length@ # == 2, IntegerLength[#1, 2] == IntegerLength[#2, 2] & @@ #] &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ #] &] (* _Michael De Vlieger_, Oct 08 2016 *)

%o (PARI) is(n)=bigomega(n)==2&&#binary(factor(n)[1,1])==#binary(n/factor(n)[1,1]) \\ _Charles R Greathouse IV_, Nov 08 2011

%o (Haskell)

%o a085721 n = a085721_list !! (n-1)

%o a085721_list = [p*q | (p,q) <- zip a084126_list a084127_list,

%o a070939 p == a070939 q]

%o -- _Reinhard Zumkeller_, Nov 10 2013

%Y Cf. A078972, A007088, A070939, A055642.

%Y Cf. A084126, A084127, A070939.

%Y Cf. A138510, A174956.

%Y Cf. A261073, A261074, A261075 (subsequences).

%Y Intersection of A001358 and A266346.

%K nonn,base,look

%O 1,1

%A _Reinhard Zumkeller_, Jul 20 2003

%E Edited by _Charles R Greathouse IV_, Aug 02 2010