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.

A175948 Let @ denote binary concatenation. Then a(n) = A175945(n)@A175946(n).

This page as a plain text file.
%I A175948 #13 Aug 05 2017 12:51:30
%S A175948 1,2,3,4,5,6,7,8,11,10,9,12,13,14,15,16,23,22,19,20,21,18,17,24,27,26,
%T A175948 25,28,29,30,31,32,47,46,39,44,41,38,35,40,43,42,45,36,37,34,33,48,55,
%U A175948 54,51,52,53,50,49,56,59,58,57,60,61,62,63,64,95,94,79,92,81,78,71,88
%N A175948 Let @ denote binary concatenation. Then a(n) = A175945(n)@A175946(n).
%C A175948 Apparently this means: take the run lengths of the 1's, then the run lengths of the 0's in the binary representation of n (scanned MSB to LSB), concatenate both lists and interpret the long list as a list of run length of alternatingly 1's and 0's. Example: n = 9 = 8+1 is 1001 in binary. Run lengths of 1's are 11 (two runs each of length 1). Run lengths of 0's are 2 (one run of length 2). The concatenation is 112, which is interpreted as 1 one, 1 zero, 2 ones, binary 1011, and recoded to decimal as a(9) = 8+2+1=11. [_R. J. Mathar_, Dec 07 2010]
%t A175948 takelist[l_, t_] := Module[{lent, term},Set[lent, Length[t]]; Table[l[[t[[y]]]], {y, 1, lent}]]
%t A175948 frombinrep[x_] := FromDigits[Flatten[Table[Table[If[OddQ[n], 1, 0], {d, 1, x[[n]]}], {n, 1, Length[x]}]], 2]
%t A175948 binrep[x_] := repcount[IntegerDigits[x, 2]]
%t A175948 onebinrep[x_]:=Module[{b},b=binrep[x];takelist[b,Range[1,Length[b],2]]]
%t A175948 zerobinrep[x_]:=Module[{b},b=binrep[x];takelist[b,Range[2,Length[b],2]]]
%t A175948 Table[frombinrep[Flatten[{onebinrep[n], zerobinrep[n]}]], {n,START,END}]
%K A175948 base,nonn
%O A175948 1,2
%A A175948 _Dylan Hamilton_, Oct 28 2010