A261074 Semiprimes whose prime factors are of equal binary length and which differ from each other in exactly two bit positions.
143, 391, 493, 589, 667, 1517, 1739, 1927, 2257, 2419, 2501, 2773, 2867, 3599, 4891, 5293, 5767, 5893, 6499, 6901, 7081, 7169, 7171, 7387, 7811, 7957, 8137, 8453, 8611, 9379, 9991, 10033, 10057, 10379, 10573, 11021, 11227, 11413, 11663, 13081, 13589, 13843, 17947, 19781, 21509, 21877, 22657, 23449, 23701, 23707, 25217, 25283, 26069, 26441, 27029
Offset: 1
Examples
143 = 11*13 is included because 11 ("1011" in binary) and 13 ("1101" in binary) differ from each other in exactly two bit-positions. 56153 = 233 * 241 is included (as term a(119)) because 233 ("11101001" in binary) and 241 ("11110001" in binary) differ from each other in exactly two bit-positions.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
- N. S. Dattani & N. Bryans, Quantum factorization of 56153 with only 4 qubits, arXiv:1411.6758 [quant-ph], 2014.
Crossrefs
Programs
-
Mathematica
Select[Range[10^5], And[Length@ # == 2, IntegerLength[#1, 2] == IntegerLength[#2, 2] & @@ #, Total@ BitXor[IntegerDigits[#1, 2], IntegerDigits[#2, 2]] == 2 & @@ #] &@ 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])); isA261074(n) = { my(a,b); if(bigomega(n)!=2, 0, a = A020639(n); b = (n/a); ((A000523(a) == A000523(b)) && (2 == norml2(binary(bitxor(a,b)))))); }; i=0; n=0; while(i < 10000, n++; if(isA261074(n), i++; write("b261074.txt", i, " ", n)));
-
Scheme
;; With Antti Karttunen's IntSeq-library. (define A261074 (MATCHING-POS 1 1 (lambda (n) (and (= 2 (A001222 n)) (= (A000523 (A020639 n)) (A000523 (A006530 n))) (= 2 (A101080bi (A020639 n) (A006530 n)))))))