login
A376312
Run-compression of first differences (A078147) of nonsquarefree numbers (A013929).
16
4, 1, 3, 4, 2, 4, 1, 2, 1, 4, 1, 3, 1, 2, 4, 3, 1, 4, 3, 1, 4, 1, 3, 4, 2, 4, 2, 1, 4, 1, 3, 1, 3, 1, 2, 4, 3, 1, 4, 3, 1, 2, 1, 3, 4, 2, 4, 1, 2, 1, 3, 1, 4, 1, 3, 4, 2, 4, 3, 1, 4, 1, 3, 4, 2, 4, 2, 1, 3, 2, 4, 1, 3, 4, 2, 3, 1, 3, 1, 4, 1, 3, 2, 1, 3, 4, 2
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
For nonprime instead of squarefree numbers we have A037201, halved A373947.
Before compressing we had A078147.
For run-sums instead of compression we have A376264.
For squarefree instead of nonsquarefree we have A376305, ones A376342.
For prime-powers instead of nonsquarefree numbers we have A376308.
A000040 lists the prime numbers, differences A001223.
A000961 and A246655 list prime-powers, differences A057820.
A003242 counts compressed compositions, ranks A333489.
A005117 lists squarefree numbers, differences A076259 (ones A375927).
A013929 lists nonsquarefree numbers, differences A078147.
A116861 counts partitions by compressed sum, by compressed length A116608.
Sequence in context: A046071 A376353 A078147 * A362331 A376264 A058303
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 24 2024
STATUS
approved