OFFSET
1,2
COMMENTS
We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, run-compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).
EXAMPLE
The sequence of squarefree numbers (A005117) is:
1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, ...
The sequence of first differences (A076259) of squarefree numbers is:
1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 3, 1, 1, 2, 1, 1, 2, 1, ...
The run-compression is A376305 (this sequence).
MATHEMATICA
First/@Split[Differences[Select[Range[100], SquareFreeQ]]]
CROSSREFS
This is the run-compression of first differences of A005117.
For run-lengths instead of compression we have A376306.
For run-sums instead of compression we have A376307.
For prime-powers instead of squarefree numbers we have A376308.
For positions of first appearances instead of compression we have A376311.
The version for nonsquarefree numbers is A376312.
Positions of 1's are A376342.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 20 2024
STATUS
approved