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.

A351009 Numbers k such that the k-th composition in standard order is a concatenation of distinct twins (x,x).

Original entry on oeis.org

0, 3, 10, 36, 43, 58, 136, 147, 228, 528, 547, 586, 676, 904, 2080, 2115, 2186, 2347, 2362, 2696, 2707, 2788, 3600, 3658, 3748, 8256, 8323, 8458, 8740, 8747, 8762, 9352, 10768, 10787, 11144, 14368, 14474, 14984, 32896, 33027, 33290, 33828, 33835, 33850, 34963
Offset: 1

Views

Author

Gus Wiseman, Feb 03 2022

Keywords

Comments

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 their binary expansions and standard compositions begin:
    0:           0  ()
    3:          11  (1,1)
   10:        1010  (2,2)
   36:      100100  (3,3)
   43:      101011  (2,2,1,1)
   58:      111010  (1,1,2,2)
  136:    10001000  (4,4)
  147:    10010011  (3,3,1,1)
  228:    11100100  (1,1,3,3)
  528:  1000010000  (5,5)
  547:  1000100011  (4,4,1,1)
  586:  1001001010  (3,3,2,2)
  676:  1010100100  (2,2,3,3)
  904:  1110001000  (1,1,4,4)
		

Crossrefs

The case of twins (binary weight 2) is A000120.
All terms are evil numbers A001969.
The version for Heinz numbers of partitions is A062503, counted by A035457.
These compositions are counted by A032020 interspersed with 0's.
Taking singles instead of twins gives A349051.
This is the strict (distinct twins) version of A351010 and A351011.
A011782 counts compositions.
A085207 represents concatenation using standard compositions.
A333489 ranks anti-runs, complement A348612.
A345167 ranks alternating compositions, counted by A025047.
A351014 counts distinct runs in standard compositions, see A351015.
Selected statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Selected classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]], 1],0]]//Reverse;
    Select[Range[0,1000], UnsameQ@@Split[stc[#]]&&And@@(#==2&)/@Length/@Split[stc[#]]&]