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 prime numbers (A000040) is:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, ...
with first differences (A001223):
1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, ...
with run-compression (A037201):
1, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, ...
with first appearance of 2n at (A376520):
2, 3, 8, 22, 32, 42, 28, 259, 91, 141, 172, 242, 341, 400, 556, 692, 198, 1119, ...
MATHEMATICA
mnrm[s_]:=If[Min@@s==1, mnrm[DeleteCases[s-1, 0]]+1, 0];
q=First/@Split[Differences[Select[Range[10000], PrimeQ]]];
Table[Position[q, 2k][[1, 1]], {k, mnrm[Rest[q]/2]}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 26 2024
STATUS
approved