OFFSET
1,2
COMMENTS
Partial sums of A333252.
FORMULA
Numbers k such that prime(k+2) - 2*prime(k+1) + prime(k) >= 0.
EXAMPLE
The prime gaps split into the following strictly decreasing subsequences: (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), ...
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 A022297.
The version for equal differences is A064113.
The version for strict ascents is A258025.
The version for strict descents is A258026.
The version for distinct differences is A333214.
The version for weak descents is A333231.
First differences are A333252 (if the first term is 0).
Prime gaps are A001223.
Weakly decreasing runs of standard compositions are counted by A124765.
Weakly increasing runs of standard compositions are counted by A124766.
Strictly increasing runs of standard compositions are counted by A124768.
Strictly decreasing runs of standard compositions are counted by A124769.
Runs of prime gaps with nonzero differences are A333216.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 18 2020
STATUS
approved