cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A332875 Sizes of maximal weakly increasing subsequences of A000002.

This page as a plain text file.
%I A332875 #10 Mar 30 2020 17:47:50
%S A332875 3,3,3,3,3,4,2,3,3,3,3,3,3,3,3,2,3,4,3,3,3,3,3,3,3,2,4,3,3,3,3,3,4,2,
%T A332875 3,3,3,3,3,3,3,4,2,3,4,3,3,3,2,4,3,2,3,4,3,3,3,2,3,4,2,3,3,3,3,3,2,4,
%U A332875 3,3,3,3,3,3,3,3,4,3,2,3,3,3,4,2,3,4,3
%N A332875 Sizes of maximal weakly increasing subsequences of A000002.
%F A332875 a(n) = A000002(2*n - 1) + A000002(2*n).
%e A332875 The weakly increasing subsequences begin: (1,2,2), (1,1,2), (1,2,2), (1,2,2), (1,1,2), (1,1,2,2), (1,2), (1,1,2), (1,2,2), (1,1,2), (1,1,2), (1,2,2), (1,2,2).
%t A332875 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]]]
%t A332875 kol[n_Integer]:=Nest[kolagrow,{1},n-1];
%t A332875 Length/@Split[kol[40],#1<=#2&]
%Y A332875 The number of runs in the first n terms of A000002 is A156253.
%Y A332875 The weakly decreasing version is A332273.
%Y A332875 Cf. A000002, A001462, A013947, A013948, A088568, A288605, A296658, A329315, A329316, A329317, A329362.
%K A332875 nonn
%O A332875 1,1
%A A332875 _Gus Wiseman_, Mar 08 2020