cp's OEIS Frontend

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.

A088161 n rotated one binary place to the right less n rotated one binary place to the left.

This page as a plain text file.
%I A088161 #11 Mar 04 2025 16:12:16
%S A088161 0,0,0,0,1,3,-2,0,3,9,0,6,-3,3,-6,0,7,21,4,18,1,15,-2,12,-5,9,-8,6,
%T A088161 -11,3,-14,0,15,45,12,42,9,39,6,36,3,33,0,30,-3,27,-6,24,-9,21,-12,18,
%U A088161 -15,15,-18,12,-21,9,-24,6,-27,3,-30,0,31,93,28,90,25,87,22,84,19,81,16,78,13,75,10,72,7,69,4
%N A088161 n rotated one binary place to the right less n rotated one binary place to the left.
%C A088161 f(n) is negative about 2/7 of the time to 10^7. f(n) is zero, see A088163.
%H A088161 Robert Israel, <a href="/A088161/b088161.txt">Table of n, a(n) for n = 0..10000</a>
%F A088161 a(n) = A038572(n) - A006257(n).
%p A088161 f:= proc(n) local a,b;
%p A088161   if n::even then a:= n/2 else a:= 2^ilog2(n) + (n-1)/2 fi;
%p A088161   if n = 0 then b:= 0 else b:= 2*n + 1 - 2^(ilog2(n)+1) fi;
%p A088161   a-b
%p A088161 end proc:
%p A088161 map(f, [$0..200]); # _Robert Israel_, Mar 03 2025
%t A088161 f[n_] := FromDigits[ RotateRight[ IntegerDigits[n, 2]], 2] - FromDigits[ RotateLeft[ IntegerDigits[n, 2]], 2]; Table[ f[n], {n, 0, 82}]
%Y A088161 Cf. A006257, A038572, A088163.
%K A088161 sign,base,look
%O A088161 0,6
%A A088161 _Robert G. Wilson v_, Sep 13 2003