OFFSET
1,2
FORMULA
Numbers k such that prime(k+1) - prime(k) != prime(k+2) - prime(k+1).
EXAMPLE
The sequence of differences between primes splits into the following runs: (1), (2,2), (4), (2), (4), (2), (4), (6), (2), (6), (4), (2), (4), (6,6), (2), (6), (4), (2), (6), (4), (6).
MATHEMATICA
Accumulate[Length/@Split[Differences[Array[Prime, 100]], #1==#2&]]//Most
- or -
Select[Range[100], Prime[#+1]-Prime[#]!=Prime[#+2]-Prime[#+1]&]
CROSSREFS
The version for the Kolakoski sequence is A054353.
Complement of A064113 (the version for adjacent equal terms).
Runs of compositions in standard order are counted by A124767.
A triangle for runs of compositions is A238279.
The version for strict ascents is A258025.
The version for strict descents is A258026.
The version for weak ascents is A333230.
The version for weak descents is A333231.
First differences are A333254 (if the first term is 0).
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 15 2020
STATUS
approved