|
|
A240750
|
|
Table where row n contains all compositions of n into an even number of parts.
|
|
1
|
|
|
1, 1, 2, 1, 1, 2, 3, 1, 2, 2, 1, 3, 1, 1, 1, 1, 4, 1, 3, 2, 2, 3, 2, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 5, 1, 4, 2, 3, 3, 3, 1, 1, 1, 2, 4, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 5, 1, 3, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,3
|
|
COMMENTS
|
Can also be regarded as a table where row n is the n-th composition into an even number of parts, sorted by sum of composition and then reverse lexicographically.
|
|
LINKS
|
|
|
EXAMPLE
|
The table starts:
{}
(none)
11
21,12
31,22,13,1111
41,32,23,2111,14,1211,1121,1112
51,42,33,3111,24,2211,2121,2112,15,1311,1221,1212,1131,1122,1113,111111
|
|
PROG
|
(PARI) evil(n) = local(r=0, m=n); while(m>0, if(m%2==1, r=1-r); m\=2); n*2+r
A066099row(n) = {local(v=vector(n), j=0, k=0);
while(n>0, k++; if(n%2==1, v[j++]=k; k=0); n\=2);
vector(j, i, v[j-i+1])}
arow(n)=A066099row(evil(n))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|