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.
%I A360141 #36 Dec 19 2024 11:46:19 %S A360141 0,1,1,2,2,3,4,5,5,6,9,10,10,11,12,19,20,21,21,21,22,25,38,41,42,42, %T A360141 43,44,51,76,83,84,85,85,85,86,89,102,153,166,169,170,170,170,171,172, %U A360141 179,204,307,332,339,340,341,341,341,342,345,358,409,614,665 %N A360141 Bitwise encoding of the right half, initially empty, state of the 1D cellular automaton from A359303 after n steps. %C A360141 See A359303 for how the automaton steps. %C A360141 The automaton state is a bi-infinite string of 1's and 0's of the form ...1111 middle 0000... and the right half here is the part which began as 0's. %C A360141 The right half state is encoded in an integer by interpreting the bits from left to right as binary from least to most significant bit. %H A360141 Kevin Ryde, <a href="/A360141/b360141.txt">Table of n, a(n) for n = 0..3000</a> %H A360141 Kevin Ryde, <a href="/A360141/a360141.gp.txt">PARI/GP Code</a> %e A360141 Following the state progression from A359303 (state(n)) is converted to the sequence (a(n)) by: %e A360141 state(0) = ..1111|0000.. %e A360141 |0000.. %e A360141 a(0) = 0 = \---> bits 000.. %e A360141 state(1) = ..1110|1000.. %e A360141 |1000.. %e A360141 a(1) = 1 = \---> bits 100.. %e A360141 state(2) = ..111101|10000.. %e A360141 |10000.. %e A360141 a(2) = 1 = \---> bits 100.. %e A360141 state(3) = ..111101|01000.. %e A360141 |01000.. %e A360141 a(3) = 2 = \---> bits 01000.. %e A360141 state(4) = ..111011|01000.. %e A360141 a(4) = 2 = \---> bits 01000.. %e A360141 state(5) = ..111010|11000.. %e A360141 a(5) = 3 = \---> bits 11000.. %t A360141 ClearAll[{s, prop, checkprop, doprop, p, a, j,runpos}]; %t A360141 prop[s_]:=(p=Array[0#&, Length[s]]; %t A360141 Do[If[i==1 ||i==Length[s], p[[i]]=0, %t A360141 {p[[i-1]], p[[i]], p[[i+1]]}+= %t A360141 Piecewise[{{{1, -1, 0}, {s[[i-1]], s[[i]], s[[i+1]]}=={0, 1, 1}}, %t A360141 {{0, -1, 1}, {s[[i-1]], s[[i]], s[[i+1]]}=={1, 1, 0}}}, {0, 0, 0}]], {i, 1, Length[s]-1} ]; %t A360141 Return[p]) %t A360141 checkprop[s_]:=(p=s; %t A360141 Do[If[p[[i]]==2, {p[[i-1]], p[[i]], p[[i+1]]}={0, 0, 0}], {i, 2, Length[s]-1}]; %t A360141 Return[p]) %t A360141 doprop[s_]:= Return[s +checkprop[prop[s]]] %t A360141 (* show only positive states: *) %t A360141 runpos[n_]:=( s=Join[Array[#/#&, n+5], Array[0#&, n+5]] ; Table[Drop[Nest[doprop[#]&, s, k],n+5], {k, 0, n}]) %t A360141 (* conversion from the automaton states to integers *) %t A360141 (* a[10] returns {0,1,1,2,2,3,4,5,5,6,9} *) %t A360141 a[j_]:=Table[FromDigits[Reverse[runpos[j+1][[k, All]]],2], {k, 1, j+1}] %o A360141 (PARI) \\ See links. %Y A360141 Cf. Base sequence A359303. Encoding of complementary left-half in A360142. %K A360141 nonn,base %O A360141 0,4 %A A360141 _Raphael J. F. Berger_, Jan 27 2023