OFFSET
1,1
COMMENTS
Positions of strict descents in the Kolakoski sequence A000002. Strict ascents are A156243. - Gus Wiseman, Mar 31 2020
MATHEMATICA
kolagrow[q_]:=If[Length[q]<2, Take[{1, 2}, Length[q]+1], Append[q, Switch[{q[[Length[Split[q]]]], q[[-2]], Last[q]}, {1, 1, 1}, 0, {1, 1, 2}, 1, {1, 2, 1}, 2, {1, 2, 2}, 0, {2, 1, 1}, 2, {2, 1, 2}, 2, {2, 2, 1}, 1, {2, 2, 2}, 1]]]
kol[n_Integer]:=Nest[kolagrow, {1}, n-1];
Join@@Position[Partition[kol[100], 2, 1], {2, 1}] (* Gus Wiseman, Mar 31 2020 *)
CROSSREFS
The version for prime gaps is A258026.
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 07 2009
STATUS
approved