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.

A125106 Enumeration of partitions by binary representation: each 1 is a part; the part size is 1 more than the number of 0's in the rest of the number.

This page as a plain text file.
%I A125106 #45 Jan 17 2023 21:24:51
%S A125106 1,2,1,1,3,2,1,2,2,1,1,1,4,3,1,3,2,2,1,1,3,3,2,2,1,2,2,2,1,1,1,1,5,4,
%T A125106 1,4,2,3,1,1,4,3,3,2,1,3,2,2,2,1,1,1,4,4,3,3,1,3,3,2,2,2,1,1,3,3,3,2,
%U A125106 2,2,1,2,2,2,2,1,1,1,1,1
%N A125106 Enumeration of partitions by binary representation: each 1 is a part; the part size is 1 more than the number of 0's in the rest of the number.
%C A125106 Another way to describe this: starting with the binary representation and a counter set at one, count the 0's from right to left. Write a term equal to the counter for each "1" encountered.
%C A125106 A101211 is a similar sequence, with A005811 elements per row which maps natural numbers to compositions (ordered partitions).
%C A125106 There are two ways to consider this as a table: taking each partition as a row, or taking the partitions generated by 2^(n-1) through 2^n-1 as a row.
%C A125106 Taking the n-th row as multiple partitions, it consists of those partitions with the first hook size (largest part plus number of parts minus 1) equal to n. The number of integers in this n-th row is A001792(n-1), and the row sum is A049611.
%C A125106 Taking each partition as a separate row, the row lengths are A000120, and the row sums are A161511.
%C A125106 Heinz numbers of the rows are A005940. - _Gus Wiseman_, Jan 17 2023
%H A125106 Alois P. Heinz, <a href="/A125106/b125106.txt">Rows n = 1..12, flattened</a>
%F A125106 Partition 2n is partition n with every part size increased by 1; partition 2n+1 is partition n with an additional part of size 1.
%F A125106 T(n,k) = A272020(n,k) - A000120(n) + k. - _Gus Wiseman_, Jan 17 2023
%e A125106 Row 4:
%e A125106 1000 [4]
%e A125106 1001 [3,1]
%e A125106 1010 [3,2]
%e A125106 1011 [2,1,1]
%e A125106 1100 [3,3]
%e A125106 1101 [2,2,1]
%e A125106 1110 [2,2,2]
%e A125106 1111 [1,1,1,1]
%p A125106 b:= proc(n) local c, l, m; l:=[][]; m:= n; c:=1;
%p A125106       while m>0 do if irem(m, 2, 'm')=0 then c:= c+1
%p A125106          else l:= c, l fi
%p A125106       od; l
%p A125106     end:
%p A125106 T:= n-> seq(b(i), i=2^(n-1)..2^n-1):
%p A125106 seq(T(n), n=1..7);  # _Alois P. Heinz_, Sep 25 2015
%t A125106 f[k_] := (bits = IntegerDigits[k, 2]; zerosCount = Reverse[ Accumulate[ 1-Reverse[bits] ] ] + 1; Select[ Transpose[ {bits, zerosCount} ], First[#] == 1 & ][[All, 2]]); row[n_] := Table[ f[k], {k, 2^(n-1), 2^n-1}]; Flatten[ Table[ row[n], {n, 1, 5}]] (* _Jean-François Alcover_, Jan 24 2012 *)
%t A125106 scc[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
%t A125106 Table[Reverse[scc[n]-Range[Length[scc[n]]]+1],{n,0,20}] (* _Gus Wiseman_, Jan 17 2023 *)
%Y A125106 Cf. A000041, A005811, A037016, A101211, A001792, A049611, A126411.
%Y A125106 Each partition as row: A000120 (row widths), A161511 (row sums), A243499 (row products).
%Y A125106 Cf. A005940. - _Franklin T. Adams-Watters_, Mar 06 2010
%Y A125106 Lasts are A001511.
%Y A125106 Firsts are A008687.
%Y A125106 Cf. A019565, A029837, A029931, A048793, A059893, A066099, A070939, A242628.
%K A125106 tabf,nice,nonn
%O A125106 1,2
%A A125106 _Alford Arnold_, Dec 10 2006
%E A125106 Edited by _Franklin T. Adams-Watters_, Jun 11 2009