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.

A327983 Run lengths in A051023, the middle column of rule-30 1-D cellular automaton, when started from a lone 1 cell.

This page as a plain text file.
%I A327983 #10 Oct 04 2019 15:05:54
%S A327983 2,1,3,2,2,3,1,1,2,2,1,2,3,1,1,1,3,2,3,1,1,1,1,1,2,4,2,2,1,1,1,1,2,1,
%T A327983 1,1,1,1,6,4,4,3,1,1,1,1,3,5,1,2,1,1,2,3,3,3,2,1,2,1,2,1,1,7,1,3,5,1,
%U A327983 3,1,1,2,3,3,3,1,1,1,3,5,2,2,1,3,2,2,4,2,6,6,7,1,2,2,1,1,2,1,3,5,1,1,2,3,2
%N A327983 Run lengths in A051023, the middle column of rule-30 1-D cellular automaton, when started from a lone 1 cell.
%H A327983 Antti Karttunen, <a href="/A327983/b327983.txt">Table of n, a(n) for n = 1..100000</a>
%H A327983 <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>
%e A327983 The evolution of one-dimensional cellular automaton rule 30 proceeds as follows, when started from a single alive (1) cell:
%e A327983    0:              (1)
%e A327983    1:             1(1)1
%e A327983    2:            11(0)01
%e A327983    3:           110(1)111
%e A327983    4:          1100(1)0001
%e A327983    5:         11011(1)10111
%e A327983    6:        110010(0)001001
%e A327983    7:       1101111(0)0111111
%e A327983    8:      11001000(1)11000001
%e A327983    9:     110111101(1)001000111
%e A327983   10:    1100100001(0)1111011001
%e A327983   11:   11011110011(0)10000101111
%e A327983   12:  110010001110(0)110011010001
%e A327983   13: 1101111011001(1)1011100110111
%e A327983 When noting up the lengths of consecutive identical values ("runs") in its central column (indicated here with parentheses), we see that there are two ones at first, followed by one zero, followed by three ones, then two zeros, etc, and so we obtain the terms on this sequence: 2, 1, 3, 2, 2, 3, ...
%t A327983 Length /@ Split@ CellularAutomaton[30, {{1}, 0}, {105, {{0}}}] (* _Michael De Vlieger_, Oct 04 2019 *)
%o A327983 (PARI)
%o A327983 up_to = 105;
%o A327983 A269160(n) = bitxor(n, bitor(2*n, 4*n));
%o A327983 A327983list(up_to) = { my(v=vector(up_to), s=1, oc=s, nc, n=0, on=n, k=0); while(k<up_to, n++; s = A269160(s); nc = (s>>n)%2; if(nc!=oc, oc=nc; k++; v[k] = (n-on); on=n)); (v); }
%o A327983 v327983 = A327983list(up_to);
%o A327983 A327983(n) = v327983[n];
%Y A327983 Cf. A051023, A269160, A327974, A327980, A327981, A327984, A327985.
%K A327983 nonn
%O A327983 1,1
%A A327983 _Antti Karttunen_, Oct 03 2019