

A333212


Lengths of maximal weakly decreasing subsequences in the sequence of prime gaps (A001223).


12



1, 2, 2, 2, 1, 2, 3, 1, 3, 3, 2, 1, 3, 2, 1, 2, 2, 2, 3, 3, 2, 2, 4, 1, 2, 5, 3, 1, 3, 1, 2, 2, 1, 1, 4, 1, 2, 1, 2, 2, 2, 1, 3, 1, 3, 2, 1, 2, 2, 4, 1, 4, 4, 3, 1, 3, 2, 1, 1, 2, 5, 3, 2, 2, 2, 2, 2, 1, 3, 1, 3, 1, 2, 1, 3, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Prime gaps are differences between adjacent prime numbers.


LINKS

Table of n, a(n) for n=1..87.


FORMULA

Ones correspond to weak prime quartets A054819, so the sum of terms up to but not including the nth one is A000720(A054819(n  1)).


EXAMPLE

The prime gaps split into the following weakly 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), ...


MATHEMATICA

Length/@Split[Differences[Array[Prime, 100]], #1>=#2&]//Most


CROSSREFS

First differences of A258025 (with zero prepended).
The version for the Kolakoski sequence is A332273.
The weakly increasing version is A333215.
The unequal version is A333216.
The strictly decreasing version is A333252.
The strictly increasing version is A333253.
The equal version is A333254.
Prime gaps are A001223.
Positions of adjacent equal differences are A064113.
Weakly decreasing runs of compositions in standard order are A124765.
Positions of strict ascents in the sequence of prime gaps are A258025.
Cf. A000040, A000720, A001221, A036263, A054819, A084758, A114994, A124760, A124761, A124768, A333213, A333214.
Sequence in context: A120965 A151931 A185636 * A182597 A290491 A194314
Adjacent sequences: A333209 A333210 A333211 * A333213 A333214 A333215


KEYWORD

nonn


AUTHOR

Gus Wiseman, Mar 14 2020


STATUS

approved



