login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A066099 Triangle read by rows, in which row n lists the compositions of n in reverse lexicographic order. 381

%I #111 Jun 26 2023 10:19:24

%S 1,2,1,1,3,2,1,1,2,1,1,1,4,3,1,2,2,2,1,1,1,3,1,2,1,1,1,2,1,1,1,1,5,4,

%T 1,3,2,3,1,1,2,3,2,2,1,2,1,2,2,1,1,1,1,4,1,3,1,1,2,2,1,2,1,1,1,1,3,1,

%U 1,2,1,1,1,1,2,1,1,1,1,1,6,5,1,4,2,4,1,1,3,3,3,2,1,3,1,2,3,1,1,1,2,4,2,3

%N Triangle read by rows, in which row n lists the compositions of n in reverse lexicographic order.

%C The representation of the compositions (for fixed n) is as lists of parts, the order between individual compositions (for the same n) is (list-)reversed lexicographic; see the example by _Omar E. Pol_. - _Joerg Arndt_, Sep 03 2013

%C This is the standard ordering for compositions in this database; it is similar to the Mathematica ordering for partitions (A080577). Other composition orderings include A124734 (similar to the Abramowitz & Stegun ordering for partitions, A036036), A108244 (similar to the Maple partition ordering, A080576), etc (see crossrefs).

%C Factorize each term in A057335; sequence records the values of the resulting exponents. It also runs through all possible permutations of multiset digits.

%C This can be regarded as a table in two ways: with each composition as a row, or with the compositions of each integer as a row. The first way has A000120 as row lengths and A070939 as row sums; the second has A001792 as row lengths and A001788 as row sums. - _Franklin T. Adams-Watters_, Nov 06 2006

%C This sequence includes every finite sequence of positive integers. - _Franklin T. Adams-Watters_, Nov 06 2006

%C Compositions (or ordered partitions) are also generated in sequence A101211. - _Alford Arnold_, Dec 12 2006

%C The equivalent sequence for partitions is A228531. - _Omar E. Pol_, Sep 03 2013

%C The sole partition of zero has no components, not a single component of length one. Hence the first nonempty row is row 1. - _Franklin T. Adams-Watters_, Apr 02 2014 [Edited by _Andrey Zabolotskiy_, May 19 2018]

%C See sequence A261300 for another version where the terms of each composition are concatenated to form one single integer: (0, 1, 2, 11, 3, 21, 12, 111,...). This also shows how the terms can be obtained from the binary numbers A007088, cf. Arnold's first Example. - _M. F. Hasler_, Aug 29 2015

%C The k-th composition in the list 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 is described as the standard ordering used in the OEIS, although the sister sequence A228351 is also sometimes considered to be canonical. Both sequences define a bijective correspondence between nonnegative integers and integer compositions. - _Gus Wiseman_, May 19 2020

%C First differences of A030303 = positions of bits 1 in the concatenation A030190 (= A030302) of numbers written in binary (A007088). - Indices of record values (= first occurrence of n) are given by A005183: a(A005183(n)) = n, cf. FORMULA for more. - _M. F. Hasler_, Oct 12 2020

%H Franklin T. Adams-Watters, <a href="/A066099/b066099.txt">Table of n, a(n) for n = 1..5120 (through compositions of 10)</a>

%H M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].

%H Gus Wiseman, <a href="https://docs.google.com/document/d/e/2PACX-1vTCPiJVFUXN8IqfLlCXkgP15yrGWeRhFS4ozST5oA4Bl2PYS-XTA3sGsAEXvwW-B0ealpD8qnoxFqN3/pub">Statistics, classes, and transformations of standard compositions</a>

%F From _M. F. Hasler_, Oct 12 2020: (Start)

%F a(n) = A030303(n+1) - A030303(n).

%F a(A005183(n)) = n; a(A005183(n)+1) = n-1 (n>1); a(A005183(n)+2) = 1. (End)

%e A057335 begins 1 2 4 6 8 12 18 30 16 24 36 ... so we can write

%e 1 2 1 3 2 1 1 4 3 2 2 1 1 1 1 ...

%e . . 1 . 1 2 1 . 1 2 1 3 2 1 1 ...

%e . . . . . . 1 . . . 1 . 1 2 1 ...

%e . . . . . . . . . . . . . . 1 ...

%e - and the columns here gives the rows of the triangle, which begins

%e 1

%e 2; 1 1

%e 3; 2 1; 1 2; 1 1 1

%e 4; 3 1; 2 2; 2 1 1; 1 3; 1 2 1; 1 1 2; 1 1 1 1

%e ...

%e The 25th row is associated with the Quet number 162 = 2^1 * 3^3 * 5^1 so the exponents for the ordered prime signature form the vector (1,3,1). Following the method described in A108730 we subtract one from each cell yielding (0,2,0) which gives the number of 0's following each 1 in 11001 (the binary representation of the number 25). - _Alford Arnold_, Mar 05 2006

%e From _Omar E. Pol_, Sep 03 2013: (Start)

%e Illustration of initial terms:

%e -----------------------------------

%e n j Diagram Composition j

%e -----------------------------------

%e . _

%e 1 1 |_| 1;

%e . _ _

%e 2 1 | _| 2,

%e 2 2 |_|_| 1, 1;

%e . _ _ _

%e 3 1 | _| 3,

%e 3 2 | _|_| 2, 1,

%e 3 3 | | _| 1, 2,

%e 3 4 |_|_|_| 1, 1, 1;

%e . _ _ _ _

%e 4 1 | _| 4,

%e 4 2 | _|_| 3, 1,

%e 4 3 | | _| 2, 2,

%e 4 4 | _|_|_| 2, 1, 1,

%e 4 5 | | _| 1, 3,

%e 4 6 | | _|_| 1, 2, 1,

%e 4 7 | | | _| 1, 1, 2,

%e 4 8 |_|_|_|_| 1, 1, 1, 1;

%e .

%e (End)

%t Table[FactorInteger[Apply[Times, Map[Prime, Accumulate @ IntegerDigits[n, 2]]]][[All, -1]], {n, 41}] // Flatten (* _Michael De Vlieger_, Jul 11 2017 *)

%t stc[n_] := Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]] // Reverse;

%t Table[stc[n], {n, 0, 20}] // Flatten (* _Gus Wiseman_, May 19 2020 *)

%t Table[Reverse @ LexicographicSort @ Flatten[Permutations /@ Partitions[n], 1], {n, 10}] // Flatten (* _Eric W. Weisstein_, Jun 26 2023 *)

%o (PARI) arow(n) = {local(v=vector(n),j=0,k=0);

%o while(n>0,k++; if(n%2==1,v[j++]=k;k=0);n\=2);

%o vector(j,i,v[j-i+1])} \\ returns empty for n=0. - _Franklin T. Adams-Watters_, Apr 02 2014

%o (Haskell)

%o a066099 = (!!) a066099_list

%o a066099_list = concat a066099_tabf

%o a066099_tabf = map a066099_row [1..]

%o a066099_row n = reverse $ a228351_row n

%o -- (each composition as a row)

%o -- _Peter Kagey_, Aug 25 2016

%o (Sage)

%o def a_row(n): return list(reversed(Compositions(n)))

%o flatten([a_row(n) for n in range(1,6)]) # _Peter Luschny_, May 19 2018

%Y Lists of compositions of integers: this sequence (reverse lexicographic order; minus one gives A108730), A228351 (reverse colexicographic order - every composition is reversed; minus one gives A163510), A228369 (lexicographic), A228525 (colexicographic), A124734 (length, then lexicographic; minus one gives A124735), A296774 (length, then reverse lexicographic), A337243 (length, then colexicographic), A337259 (length, then reverse colexicographic), A296773 (decreasing length, then lexicographic), A296772 (decreasing length, then reverse lexicographic), A337260 (decreasing length, then colexicographic), A108244 (decreasing length, then reverse colexicographic), also A101211 and A227736 (run lengths of bits).

%Y Cf. row length and row sums for different splittings into rows: A000120, A070939, A001792, A001788.

%Y Cf. A228531, A096903, A065120, A057335, A055932, A005811, A261300, A007088.

%Y Cf. lists of partitions of integers, or multisets of integers: A026791 and crosserfs therein, A112798 and crossrefs therein.

%Y See link for additional crossrefs pertaining to standard compositions.

%Y A related ranking of finite sets is A048793/A272020.

%Y Cf. A035327, A106356, A238279, A333219.

%K easy,nice,nonn,tabf

%O 1,2

%A _Alford Arnold_, Dec 30 2001

%E Edited with additional terms by _Franklin T. Adams-Watters_, Nov 06 2006

%E 0th row removed by _Andrey Zabolotskiy_, May 19 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 13:07 EDT 2024. Contains 371945 sequences. (Running on oeis4.)