A321695 For any sequence f of positive integers, let g(f) be the unique Golomb-like sequence with run lengths given by f and let k(f) be the unique Kolakoski-like sequence with run lengths given by f and initial term 1; this sequence is the unique sequence f satisfying f = g(k(f)).
1, 2, 2, 3, 3, 4, 5, 6, 6, 7, 7, 8, 8, 9, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 17, 18, 19, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 28, 29, 30, 31, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39, 39, 40, 41, 42, 43, 44, 45, 46, 47
Offset: 1
Keywords
Examples
We can build this sequence alongside A321696 iteratively: - this sequence starts with 1, - hence A321696 starts with 1, 2 (after the initial run of 1's, we have a run of 2's), - hence this sequence starts with 1, 2, 2, 3 (after the runs of 1's and 2's, we have a run of 3's), - hence A321696 starts with 1, 2, 2, 1, 1, 2, 2, 2, 1, - hence this sequence starts 1, 2, 2, 3, 3, 4, 5, 6, 6, 7, 7, 8, 8, 9, 10, - etc.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, PARI program for A321695
Programs
-
PARI
See Links section.
Comments