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.

A334028 Number of distinct parts in the n-th composition in standard order.

This page as a plain text file.
%I A334028 #5 Apr 18 2020 11:51:02
%S A334028 0,1,1,1,1,2,2,1,1,2,1,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,2,
%T A334028 2,2,1,3,3,2,2,3,1,2,3,2,2,2,2,2,3,2,3,2,2,2,2,2,2,2,2,2,2,1,1,2,2,2,
%U A334028 2,3,3,2,2,2,2,3,2,3,3,2,2,3,2,3,2,2,2
%N A334028 Number of distinct parts in the n-th composition in standard order.
%C A334028 A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
%e A334028 The 77th composition is (3,1,2,1), so a(77) = 3.
%t A334028 stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
%t A334028 Table[Length[Union[stc[n]]],{n,0,100}]
%Y A334028 Number of distinct prime indices is A001221.
%Y A334028 Positions of first appearances (offset 1) are A246534.
%Y A334028 Positions of 1's are A272919.
%Y A334028 All of the following pertain to compositions in standard order (A066099):
%Y A334028 - Length is A000120.
%Y A334028 - Necklaces are A065609.
%Y A334028 - Sum is A070939.
%Y A334028 - Runs are counted by A124767.
%Y A334028 - Rotational symmetries are counted by A138904.
%Y A334028 - Strict compositions are A233564.
%Y A334028 - Constant compositions are A272919.
%Y A334028 - Aperiodic compositions are A328594.
%Y A334028 - Rotational period is A333632.
%Y A334028 - Dealings are A333939.
%Y A334028 Cf. A001037, A059966, A060223, A066099, A333765, A333940.
%K A334028 nonn
%O A334028 0,6
%A A334028 _Gus Wiseman_, Apr 18 2020