Search: id:A035928 Results 1-1 of 1 results found. %I A035928 %S A035928 2,10,12,38,42,52,56,142,150,170,178,204,212,232,240,542,558,598,614, %T A035928 666,682,722,738,796,812,852,868,920,936,976,992,2110,2142,2222,2254, %U A035928 2358,2390,2470,2502,2618,2650,2730,2762,2866,2898,2978,3010,3132,3164 %N A035928 Numbers n such that BCR(n) = n, where BCR = binary-complement-and-reverse = take one's complement then reverse bit order. %C A035928 Numbers n such that A036044(n) = n. %C A035928 Also: numbers such that n+BR(n) is in A000225={2^k-1} (with BR = binary reversed). - M. F. Hasler (Maximilian.Hasler(AT)gmail.com), Dec 17 2007 %F A035928 If offset were 0, a(2n+1) - a(2n) = 2^[log2(n)+1]. %e A035928 38 is such a number because 38=100110; complement to get 011001, then reverse bit order to get 100110. %p A035928 [seq(ReflectBinSeq(j,(floor_log_2(j)+1)),j=1..256)]; %p A035928 ReflectBinSeq := (x,n) -> (((2^n)*x)+binrevcompl(x)); %p A035928 binrevcompl := proc(nn) local n,z; n := nn; z := 0; while(n <> 0) do z := 2*z + ((n+1) mod 2); n := floor(n/2); od; RETURN(z); end; %p A035928 floor_log_2 := proc(n) local nn,i: nn := n; for i from -1 to n do if(0 = nn) then RETURN(i); fi: nn := floor(nn/2); od: end; # Computes essentially the same as floor(log[2](n)) %o A035928 (PARI) for(n=1,1000,l=length(binary(n)); b=binary(n); if(sum(i=1,l,abs(component(b, i)-component(b,l+1-i)))==l,print1(n,","))) %o A035928 (PARI) for(i=0,999,if(Set(vecextract(t=binary(i),"-1..1")+t)==["1"],print1(i", "))) - M. F. Hasler (Maximilian.Hasler(AT)gmail.com), Dec 17 2007 %Y A035928 Cf. A061855. %Y A035928 Cf. A000225. %Y A035928 Sequence in context: A080139 A055701 A154391 this_sequence A014486 A166751 A071162 %Y A035928 Adjacent sequences: A035925 A035926 A035927 this_sequence A035929 A035930 A035931 %K A035928 nonn,nice,easy %O A035928 1,1 %A A035928 Mike Keith (domnei(AT)aol.com) %E A035928 More terms from Erich Friedman (erich.friedman(AT)stetson.edu). Search completed in 0.001 seconds