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.

A261074 Semiprimes whose prime factors are of equal binary length and which differ from each other in exactly two bit positions.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 22 2015

Keywords

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.
		

Crossrefs

Cf. also A261073, A261075.
Subsequence of A085721.

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)))))))