%I #26 Feb 20 2018 22:50:50
%S 1,4,2,1,1,3,2,4,2,5,2,1,2,1,2,5,1,1,3,2,1,7,1,4,3,5,3,2,1,2,2,2,1,4,
%T 2,3,2,1,3,2,1,6,1,2,3,2,1,4,2,2,2,1,5,3,4,2,2,2,3,1,5,3,2,1,2,2,5,1,
%U 2,1,3,2,1,2,6,2,2,3,3,1,2,8,2,4,1,3,1,2,5,1,1,3,1,2,2,1,4,1,4,2,6,1,2,1,3
%N Hamming distance between two consecutive semiprimes.
%C The least semiprime whose Hamming distance between it and its successor semiprime is k: 4, 9, 15, 6, 26, 123, 62, 254, 511, 3071, 2047, 8189, 32765, 16382, 98303, 65531, 393215, 262142, 1572863, 2621438, 1048574, 16777207, 8388607, 50331647, 33554429, 134217721, 268435451, etc.
%C Not surprisingly, the above are often the largest semiprime < 2^j.
%H Robert Israel, <a href="/A293424/b293424.txt">Table of n, a(n) for n = 1..10000</a>
%e a(1) = 1 because the semiprimes 4 & 6, 100_2 & 110_2 have a Hamming distance of 1;
%e a(2) = 4 because the semiprimes 6 & 9, 110_2 & 1001_2 have a Hamming distance of 4;
%e a(3) = 2 because the semiprimes 9 & 10, 1001_2 & 1010_2 have a Hamming distance of 2; etc.
%p semiprimes:= select(t -> numtheory:-bigomega(t)=2, [$4..1023]):
%p L:=map(t -> convert(t+1024,base,2), semiprimes):
%p map(t -> 11 - numboccur(0,t), L[2..-1]-L[1..-2]); # _Robert Israel_, Oct 08 2017
%p # alternative
%p read("transforms") :
%p A293424 := proc(n)
%p local s1,s2 ;
%p s1 := A001358(n) ;
%p s2 := A001358(n+1) ;
%p XORnos(s1,s2) ;
%p wt(%) ;
%p end proc: # _R. J. Mathar_, Jan 06 2018
%t Count[ IntegerDigits[ BitXor[ #[[1]], #[[2]]], 2], 1] & /@ Partition[ Select[ Range@330, PrimeOmega@# == 2 &], 2, 1]
%o (PARI) lista(nn) = my(v = select(x->bigomega(x)==2, vector(nn, k, k))); vector(#v-1, k, norml2(binary(bitxor(v[k], v[k+1])))); \\ _Michel Marcus_, Oct 11 2017
%Y Cf. A001358 (semiprimes), A205510 (between consecutive primes).
%K base,nonn
%O 1,2
%A _Robert G. Wilson v_, Oct 08 2017