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.

A357489 Numbers k such that the k-th composition in standard order is a triple (w,x,y) such that 2w = 3x + 4y.

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