OFFSET
1,1
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..5000
EXAMPLE
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.
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 *)
PROG
(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)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Sep 22 2015
STATUS
approved