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.
%I A206853 #51 Jul 09 2021 22:15:15 %S A206853 1,2,4,7,11,13,14,22,26,28,31,47,55,59,61,62,94,110,118,122,124,127, %T A206853 191,223,239,247,251,253,254,382,446,478,494,502,506,508,511,767,895, %U A206853 959,991,1007,1015,1019,1021,1022,1534,1790,1918,1982,2014,2030,2038,2042 %N A206853 a(1)=1, for n>1, a(n) is the least number > a(n-1) such that the Hamming distance D(a(n-1), a(n)) = 2. %C A206853 For integers a, b, denote by a<+>b the least c>=a, such that D(a,c)=b (note that, generally speaking, a<+>b differs from b<+>a). Then a(n+1)=a(n)<+>2. Thus this sequence is a Hamming analog of odd numbers 1,3,5,... %C A206853 A Hamming analog of nonnegative integers is A000225 and a Hamming analog of the triangular numbers is A000975. %C A206853 All terms are odious (A000069). %H A206853 Alois P. Heinz, <a href="/A206853/b206853.txt">Table of n, a(n) for n = 1..1000</a> %p A206853 read("transforms"); %p A206853 Hamming := proc(a,b) %p A206853 XORnos(a,b) ; %p A206853 wt(%) ; %p A206853 end proc: %p A206853 Dplus := proc(a,b) %p A206853 for c from a to 1000000 do %p A206853 if Hamming(a,c)=b then %p A206853 return c; %p A206853 end if; %p A206853 end do: %p A206853 return -1 ; %p A206853 end proc: %p A206853 A206853 := proc(n) %p A206853 option remember; %p A206853 if n = 1 then %p A206853 1; %p A206853 else %p A206853 Dplus(procname(n-1),2) ; %p A206853 end if; %p A206853 end proc: # _R. J. Mathar_, Apr 05 2012 %t A206853 myHammingDistance[n_, m_] := Module[{g = Max[m, n], h = Min[m, n]}, b1 = IntegerDigits[g, 2]; b2 = IntegerDigits[h, 2, Length[b1]]; HammingDistance[b1, b2]]; t = {1}; Do[If[myHammingDistance[t[[-1]], n] == 2, AppendTo[t, n]], {n, 2, 2042}]; t (* _T. D. Noe_, Mar 07 2012 *) %t A206853 t={x=1}; Do[i=x+1; While[Count[IntegerDigits[BitXor[x,i],2],1]!=2,i++]; AppendTo[t,x=i],{n,53}]; t (* _Jayanta Basu_, May 26 2013 *) %o A206853 (PARI) next_A206853(n)={my(b=binary(n)); until(norml2(binary(n)-b)==2, n++>=2^#b & b=concat(0,b)); n} %o A206853 print1(n=1); for(i=1,99,print1(","n=next_A206853(n))) \\ _M. F. Hasler_, Apr 07 2012 %Y A206853 Cf. A182187 (n<+>2), A207063 (starting from 0). %Y A206853 Cf. A000225, A205509, A205510, A205511, A205302, A205649, A205533, A122565, A206852, A000069. %K A206853 nonn,base %O A206853 1,2 %A A206853 _Vladimir Shevelev_, Feb 13 2012