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.

A335375 Numbers k such that the k-th composition in standard order (A066099) is neither unimodal nor co-unimodal.

Original entry on oeis.org

45, 54, 77, 89, 91, 93, 102, 108, 109, 110, 118, 141, 153, 155, 157, 166, 173, 177, 178, 179, 181, 182, 183, 185, 187, 189, 198, 204, 205, 206, 214, 216, 217, 218, 219, 220, 221, 222, 230, 236, 237, 238, 246, 269, 281, 283, 285, 297, 301, 305, 306, 307, 309
Offset: 1

Views

Author

Gus Wiseman, Jun 04 2020

Keywords

Comments

A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence. It is co-unimodal if its negation is unimodal.
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.

Examples

			The sequence together with the corresponding compositions begins:
   45: (2,1,2,1)
   54: (1,2,1,2)
   77: (3,1,2,1)
   89: (2,1,3,1)
   91: (2,1,2,1,1)
   93: (2,1,1,2,1)
  102: (1,3,1,2)
  108: (1,2,1,3)
  109: (1,2,1,2,1)
  110: (1,2,1,1,2)
  118: (1,1,2,1,2)
  141: (4,1,2,1)
  153: (3,1,3,1)
  155: (3,1,2,1,1)
  157: (3,1,1,2,1)
  166: (2,3,1,2)
  173: (2,2,1,2,1)
  177: (2,1,4,1)
  178: (2,1,3,2)
  179: (2,1,3,1,1)
		

Crossrefs

Non-unimodal compositions are ranked by A335373.
Non-co-unimodal compositions are ranked by A335374.
Unimodal compositions are A001523.
Unimodal normal sequences are A007052.
Unimodal permutations are A011782.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Non-unimodal normal sequences are A328509.
Numbers with non-unimodal unsorted prime signature are A332282.
Co-unimodal compositions are A332578.
Numbers with non-co-unimodal unsorted prime signature are A332642.
Non-co-unimodal compositions are A332669.

Programs

  • Mathematica
    unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],!unimodQ[stc[#]]&&!unimodQ[-stc[#]]&]