OFFSET
1,1
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, we can remove 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 nonsquarefree numbers (A013929) is:
4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, ...
with first differences (A078147):
4, 1, 3, 4, 2, 2, 4, 1, 2, 1, 4, 4, 4, 4, 1, 3, 1, 1, 2, 2, 2, 4, 3, 1, ...
with runs:
(4),(1),(3),(4),(2,2),(4),(1),(2),(1),(4,4,4,4),(1),(3),(1,1),(2,2,2), ...
and run-compression (A376312):
4, 1, 3, 4, 2, 4, 1, 2, 1, 4, 1, 3, 1, 2, 4, 3, 1, 4, 3, 1, 4, 1, 3, 4, ...
MATHEMATICA
First/@Split[Differences[Select[Range[100], !SquareFreeQ[#]&]]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 24 2024
STATUS
approved