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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Gus Wiseman, Nov 02 2022

Keywords

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.

Examples

			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)
		

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.

Programs

  • 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]]&]
  • Python
    from itertools import count, islice
    def A357489_gen(): # generator of terms
        for n in count(1):
            yield from sorted((1<0 and 6*(n-x)>m and m%6==0)
    A357489_list = list(islice(A357489_gen(),40)) # Chai Wah Wu, Nov 02 2022

Extensions

a(10)-a(28) from Chai Wah Wu, Nov 02 2022