%I #11 Nov 03 2022 05:41:43
%S 133,1034,4113,8212,32802,65576,131137,262212,524368,1048706,2097288,
%T 4194464,4194561,8388868,16777488,33554752,33554946,67109384,
%U 134218272,134218753,268436096,268436484,536871952,1073742912,1073743874,2147484928,2147485704,4294969376
%N Numbers k such that the k-th composition in standard order is a triple (w,x,y) such that 2w = 3x + 4y.
%C A composition of n is a finite sequence of positive integers summing to n. 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.
%H Chai Wah Wu, <a href="/A357489/b357489.txt">Table of n, a(n) for n = 1..10000</a>
%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>
%e The terms together with the corresponding standard compositions begin:
%e 133: (5,2,1)
%e 1034: (7,2,2)
%e 4113: (8,4,1)
%e 8212: (9,2,3)
%e 32802: (10,4,2)
%e 65576: (11,2,4)
%e 131137: (11,6,1)
%e 262212: (12,4,3)
%e 524368: (13,2,5)
%t stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
%t Select[Range[0,10000],Length[stc[#]]==3&&2*stc[#][[1]]==3*stc[#][[2]]+4*stc[#][[3]]&]
%o (Python)
%o from itertools import count, islice
%o def A357489_gen(): # generator of terms
%o for n in count(1):
%o yield from sorted((1<<n-1)+(1<<x+(y:=m//6)-1)+(1<<y-1) for x in range(1,n) if (m:=2*n-5*x)>0 and 6*(n-x)>m and m%6==0)
%o A357489_list = list(islice(A357489_gen(),40)) # _Chai Wah Wu_, Nov 02 2022
%Y See link for sequences related to standard compositions.
%Y By sum, these triples appear to be counted by A008676.
%Y The unordered version is A358102, counted by A357849.
%Y A011782 counts compositions.
%Y A066099 lists the standard compositions.
%Y Cf. A000120, A029837, A029931, A070939, A133494.
%K nonn
%O 1,1
%A _Gus Wiseman_, Nov 02 2022
%E a(10)-a(28) from _Chai Wah Wu_, Nov 02 2022
|