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!)
A357489 Numbers k such that the k-th composition in standard order is a triple (w,x,y) such that 2w = 3x + 4y. 4
133, 1034, 4113, 8212, 32802, 65576, 131137, 262212, 524368, 1048706, 2097288, 4194464, 4194561, 8388868, 16777488, 33554752, 33554946, 67109384, 134218272, 134218753, 268436096, 268436484, 536871952, 1073742912, 1073743874, 2147484928, 2147485704, 4294969376 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
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.
LINKS
EXAMPLE
The terms together with the corresponding standard compositions begin:
133: (5,2,1)
1034: (7,2,2)
4113: (8,4,1)
8212: (9,2,3)
32802: (10,4,2)
65576: (11,2,4)
131137: (11,6,1)
262212: (12,4,3)
524368: (13,2,5)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 10000], Length[stc[#]]==3&&2*stc[#][[1]]==3*stc[#][[2]]+4*stc[#][[3]]&]
PROG
(Python)
from itertools import count, islice
def A357489_gen(): # generator of terms
for n in count(1):
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)
A357489_list = list(islice(A357489_gen(), 40)) # Chai Wah Wu, Nov 02 2022
CROSSREFS
See link for sequences related to standard compositions.
By sum, these triples appear to be counted by A008676.
The unordered version is A358102, counted by A357849.
A011782 counts compositions.
A066099 lists the standard compositions.
Sequence in context: A020237 A217690 A117565 * A274175 A038491 A020265
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 02 2022
EXTENSIONS
a(10)-a(28) from Chai Wah Wu, Nov 02 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 March 28 07:20 EDT 2024. Contains 371235 sequences. (Running on oeis4.)