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.

A334966 Numbers k such that the k-th composition in standard order (row k of A066099) has weakly decreasing non-adjacent parts.

This page as a plain text file.
%I A334966 #10 May 25 2020 08:35:12
%S A334966 0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23,24,25,27,
%T A334966 31,32,33,34,35,36,37,38,39,40,41,42,43,45,47,48,49,51,55,63,64,65,66,
%U A334966 67,68,69,70,71,72,73,74,75,76,77,79,80,81,82,83,85,86,87
%N A334966 Numbers k such that the k-th composition in standard order (row k of A066099) has weakly decreasing non-adjacent parts.
%C A334966 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.
%C A334966 The complement starts: 14, 26, 28, 29, 30, 44, 46, 50, ...
%e A334966 The sequence together with the corresponding compositions begins:
%e A334966    0: ()           17: (4,1)          37: (3,2,1)
%e A334966    1: (1)          18: (3,2)          38: (3,1,2)
%e A334966    2: (2)          19: (3,1,1)        39: (3,1,1,1)
%e A334966    3: (1,1)        20: (2,3)          40: (2,4)
%e A334966    4: (3)          21: (2,2,1)        41: (2,3,1)
%e A334966    5: (2,1)        22: (2,1,2)        42: (2,2,2)
%e A334966    6: (1,2)        23: (2,1,1,1)      43: (2,2,1,1)
%e A334966    7: (1,1,1)      24: (1,4)          45: (2,1,2,1)
%e A334966    8: (4)          25: (1,3,1)        47: (2,1,1,1,1)
%e A334966    9: (3,1)        27: (1,2,1,1)      48: (1,5)
%e A334966   10: (2,2)        31: (1,1,1,1,1)    49: (1,4,1)
%e A334966   11: (2,1,1)      32: (6)            51: (1,3,1,1)
%e A334966   12: (1,3)        33: (5,1)          55: (1,2,1,1,1)
%e A334966   13: (1,2,1)      34: (4,2)          63: (1,1,1,1,1,1)
%e A334966   15: (1,1,1,1)    35: (4,1,1)        64: (7)
%e A334966   16: (5)          36: (3,3)          65: (6,1)
%e A334966 For example, (2,3,1,2) is such a composition because the non-adjacent pairs are (2,1), (2,2), (3,2), all of which are weakly decreasing, so 166 is in the sequence
%t A334966 stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
%t A334966 Select[Range[0,100],!MatchQ[stc[#],{___,x_,__,y_,___}/;y>x]&]
%Y A334966 The case of normal sequences appears to be A028859.
%Y A334966 Strict compositions are A032020.
%Y A334966 A version for ordered set partitions is A332872.
%Y A334966 These compositions are enumerated by A333148.
%Y A334966 The strict case is enumerated by A333150.
%Y A334966 Cf. A072706, A072707, A227038, A332834, A333193.
%K A334966 nonn
%O A334966 1,3
%A A334966 _Gus Wiseman_, May 18 2020