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.

A376604 Second differences of the Kolakoski sequence (A000002). First differences of A054354.

This page as a plain text file.
%I A376604 #14 Oct 04 2024 00:23:06
%S A376604 -1,-1,1,1,-2,2,-1,-1,2,-1,-1,1,1,-2,1,1,-1,-1,2,-2,1,1,-2,2,-1,-1,1,
%T A376604 1,-2,1,1,-2,2,-1,-1,2,-1,-1,1,1,-2,2,-1,-1,2,-2,1,1,-2,1,1,-1,-1,2,
%U A376604 -1,-1,1,1,-2,2,-1,-1,2,-1,-1,1,1,-2,1,1,-2,2,-1,-1
%N A376604 Second differences of the Kolakoski sequence (A000002). First differences of A054354.
%C A376604 Since A000002 has no runs of length 3, this sequence contains no zeros.
%C A376604 The densities appear to approach (1/3, 1/3, 1/6, 1/6).
%e A376604 The Kolakoski sequence (A000002) is:
%e A376604   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, ...
%e A376604 with first differences (A054354):
%e A376604   1, 0, -1, 0, 1, -1, 1, 0, -1, 1, 0, -1, 0, 1, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, ...
%e A376604 with first differences (A376604):
%e A376604   -1, -1, 1, 1, -2, 2, -1, -1, 2, -1, -1, 1, 1, -2, 1, 1, -1, -1, 2, -2, 1, 1, -2, ...
%t A376604 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,2},1,{1,2,1},2,{2,1,1},2,{2,1,2},2,{2,2,1},1,{2,2,2},1]]]
%t A376604 kol[n_]:=Nest[kolagrow,{1},n-1];
%t A376604 Differences[kol[100],2]
%Y A376604 A001462 is Golomb's sequence.
%Y A376604 A078649 appears to be zeros of the first and third differences.
%Y A376604 A288605 gives positions of first appearances of each balance.
%Y A376604 A306323 gives a 'broken' version.
%Y A376604 A333254 lists run-lengths of differences between consecutive primes.
%Y A376604 For the Kolakoski sequence (A000002):
%Y A376604 - Restrictions: A074264, A100428, A100429, A156263, A156264.
%Y A376604 - Patterns: A013947, A013948, A022292, A074262, A074263, A156242, A156243.
%Y A376604 - Statistics: A054353, A074286, A088568, A156077, A156253.
%Y A376604 - Transformations: A054354, A156728, A332273, A332875, A333229, A376604.
%Y A376604 For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power), A376599 (non-prime-power).
%K A376604 sign
%O A376604 1,5
%A A376604 _Gus Wiseman_, Oct 02 2024