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!)
A355321 Numbers k such that the k-th composition in standard order has the same number of even parts as odd. 1
0, 5, 6, 17, 18, 20, 24, 43, 45, 46, 53, 54, 58, 65, 66, 68, 72, 80, 96, 139, 141, 142, 149, 150, 154, 163, 165, 166, 169, 172, 177, 178, 180, 184, 197, 198, 202, 209, 210, 212, 216, 226, 232, 257, 258, 260, 264, 272, 288, 320, 343, 347, 349, 350, 363, 365 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The k-th composition in standard order (graded reverse-lexicographic, 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.
LINKS
EXAMPLE
The terms together with their corresponding compositions begin:
0: ()
5: (2,1)
6: (1,2)
17: (4,1)
18: (3,2)
20: (2,3)
24: (1,4)
43: (2,2,1,1)
45: (2,1,2,1)
46: (2,1,1,2)
53: (1,2,2,1)
54: (1,2,1,2)
58: (1,1,2,2)
65: (6,1)
66: (5,2)
68: (4,3)
72: (3,4)
80: (2,5)
96: (1,6)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], Count[stc[#], _?EvenQ]==Count[stc[#], _?OddQ]&]
CROSSREFS
A subset of A001969 (evil numbers), complement A000069.
These compositions are counted by A098123, without multiplicity A242821.
The version for partitions is A325698, counted by A045931.
For partitions without multiplicity we have A325700, counted by A241638.
A047993 counts balanced partitions, ranked by A106529.
A108950/A108949 count partitions with more odd/even parts.
A130780/A171966 count partitions with more or as many odd/even parts.
Sequence in context: A358091 A257338 A059013 * A327102 A191144 A327097
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 28 2022
STATUS
approved

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 11:40 EDT 2024. Contains 371936 sequences. (Running on oeis4.)