来自在线整数百科全书的问候语!http://oeis.org/ Search: id:a309709 Showing 1-1 of 1 %I A309709 %S A309709 0,2,2,4,2,2,4,4,2,4,2,4,4,4,4,4,2,4,4,6,2,2,4,4,4,6,4,6,4,4,4,4,2,4, %T A309709 4,6,4,4,6,6,2,4,2,4,4,4,4,4,4,6,6,8,4,4,6,6,4,6,4,6,4,4,4,4,2,4,4,6, %U A309709 4,4,6,6,4,6,4,6,6,6,6,6,2,4,4,6,2,2,4,4 %N A309709 Number of binary digits that change when n is multiplied by 4. %C A309709 All terms are even. %H A309709 David A. Corneth,n,a(n)n=0…9999的表%H A309709 Joerg Arndt,事项计算(FXTBook)%H A309709与N的二进制展开相关的序列的索引条目%F A309709A(n)=A000 0120(A048 725(n))。- 8月22日,2019安第斯卡塔努涅,A.309709A(A112627(n))=2×N,A112627(n)是该序列中出现2×N的第一个位置。- _David A. Corneth_, Sep 19 2019 %e A309709 00101_2 * 100_2 = 10100_2: 2 bits changed, so a(5) = 2. %p A309709 a:= n-> add(i, i=Bits[Split](Bits[Xor](n*4,n))): %p A309709 seq(a(n), n=0..120); # _Alois P. Heinz_, Aug 23 2019 %t A309709 a[n_] := Total@ IntegerDigits[BitXor[n, 4 n], 2]; Array[a, 88, 0] (* _Giovanni Resta_, Sep 19 2019 *) %o A309709 (PARI) A309709(n) = hammingweight(bitxor(n, n<<2)); \\ _Antti Karttunen_, Aug 22 2019 %o A309709 (Python) %o A309709 def A309709(n): %o A309709 s = "" %o A309709 while n > 0: %o A309709 s, n = str(n%2)+s,n//2 %o A309709 s, s4, i, j = "00"+s, s+"00", 0, 0 %o A309709 while i < len(s): %o A309709 if s[i] !309709返回J.S.A,H.M.SimeSts.,8月23日,2019‰YA309709,A000 0120,A048 725,A112627 . Cf. YA309702,A07902,A069010 . K %A309709,NN,易,%AO A309709,02%,A309709,阿里SADAYA,8月14日2019‰的内容在OEIS最终用户许可协议下可用:HTTP:/OEIS.Org/许可证= S4[i]:%%A309709J=J+ 1πO A309709 i=I+1μ%O