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.

A175950 A175948(n)-A175949(n).

This page as a plain text file.
%I A175950 #4 Mar 31 2012 20:25:48
%S A175950 0,0,0,-2,0,2,0,-6,-2,0,-2,0,4,6,0,-14,-6,-4,-8,2,0,-2,-6,-4,2,4,6,4,
%T A175950 12,14,0,-30,-14,-12,-20,-6,-12,-14,-20,6,6,0,2,0,-4,-6,-14,-12,-2,0,
%U A175950 0,14,8,6,10,0,10,12,22,12,28,30,0,-62,-30,-28,-44,-22,-36,-38,-48,-10,-18
%N A175950 A175948(n)-A175949(n).
%C A175950 A difference between two ways of encoding-decoding run lengths of 0's and 1's in the binary representation of n.
%t A175950 takelist[l_, t_] := Module[{lent, term},Set[lent, Length[t]]; Table[l[[t[[y]]]], {y, 1, lent}]]
%t A175950 frombinrep[x_] := FromDigits[Flatten[Table[Table[If[OddQ[n], 1, 0], {d, 1, x[[n]]}], {n, 1, Length[x]}]], 2]
%t A175950 binrep[x_] := repcount[IntegerDigits[x, 2]]
%t A175950 onebinrep[x_]:=Module[{b},b=binrep[x];takelist[b,Range[1,Length[b],2]]]
%t A175950 zerobinrep[x_]:=Module[{b},b=binrep[x];takelist[b,Range[2,Length[b],2]]]
%t A175950 Table[frombinrep[Flatten[{onebinrep[n], zerobinrep[n]}]], {n,START,END}]-Table[frombinrep[Flatten[{zerobinrep[n], onebinrep[n]}]], {n,START,END}]
%K A175950 sign,base,less
%O A175950 1,4
%A A175950 _Dylan Hamilton_, Oct 28 2010