A261073 Semiprimes whose prime factors are of equal binary length and which differ from each other in one bit position only.
6, 35, 323, 437, 713, 899, 1763, 1961, 2021, 2537, 3233, 4757, 5561, 5609, 6497, 7313, 9797, 10403, 10961, 11009, 18209, 19043, 21353, 22499, 23393, 26969, 27221, 29177, 37001, 38021, 39203, 45113, 71273, 72899, 79523, 87953, 95477, 98201, 99221, 106793, 114857, 114929, 123353
Offset: 1
Examples
6 = 2*3 is present, as 2 in binary is "10" and 3 in binary is "11", so both have two (significant) bits and they differ only in one bit-position from each other. 35 = 5*7 is present, as 5 in binary is "101" and 7 in binary is "111", which both have three bits, differing only in the middle position from each other.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..5000
Crossrefs
Programs
-
Mathematica
Select[Range[10^6], And[Length@ # == 2, IntegerLength[#1, 2] == IntegerLength[#2, 2] & @@ #, Total@ BitXor[IntegerDigits[#1, 2], IntegerDigits[#2, 2]] == 1 & @@ #] &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ #] &] (* Michael De Vlieger, Oct 08 2016 *)
-
PARI
A000523 = n -> logint(n, 2); A020639(n) = if(1==n,n,vecmin(factor(n)[, 1])); isA261073(n) = { my(a,b); if(bigomega(n)!=2, 0, a=A020639(n); b = (n/a); ((A000523(a) == A000523(b)) && (1 == norml2(binary(bitxor(a,b)))))); }; i=0; n=0; while(i < 5000, n++; if(isA261073(n), i++; write("b261073.txt", i, " ", n)));
-
Scheme
;; With Antti Karttunen's IntSeq-library. (define A261073 (MATCHING-POS 1 1 (lambda (n) (and (= 2 (A001222 n)) (= (A000523 (A020639 n)) (A000523 (A006530 n))) (= 1 (A101080bi (A020639 n) (A006530 n)))))))