login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333229 First sums of the Kolakoski sequence A000002. 0

%I #4 Mar 18 2020 23:02:30

%S 3,4,3,2,3,3,3,4,3,3,4,3,2,3,3,2,3,4,3,3,3,2,3,3,3,4,3,2,3,3,2,3,3,3,

%T 4,3,3,4,3,2,3,3,3,4,3,3,3,2,3,3,2,3,4,3,3,4,3,2,3,3,3,4,3,3,4,3,2,3,

%U 3,2,3,3,3,4,3,3,3,2,3,4,3,3,4,3,2,3,3

%N First sums of the Kolakoski sequence A000002.

%F a(n) = A000002(n) + A000002(n + 1).

%t 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 kol[n_Integer]:=Nest[kolagrow,{1},n-1];

%t Table[kol[n][[-1]]+kol[n+1][[-1]],{n,30}]

%Y Positions of 3's are A054353.

%Y Positions of 2's are A074262.

%Y Positions of 4's are A074263.

%Y The number of runs in the first n terms of A000002 is A156253(n).

%Y Even-indexed terms are A332273 (without the first term).

%Y Odd-indexed terms are A332875.

%Y Cf. A000002, A001462, A013947, A013948, A088568, A156728, A288605, A296658, A329315, A329316, A329317, A329362.

%K nonn

%O 1,1

%A _Gus Wiseman_, Mar 18 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)