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!)
A360141 Bitwise encoding of the right half, initially empty, state of the 1D cellular automaton from A359303 after n steps. 3
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, 43, 44, 51, 76, 83, 84, 85, 85, 85, 86, 89, 102, 153, 166, 169, 170, 170, 170, 171, 172, 179, 204, 307, 332, 339, 340, 341, 341, 341, 342, 345, 358, 409, 614, 665 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
See A359303 for how the automaton steps.
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.
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.
LINKS
Kevin Ryde, PARI/GP Code
EXAMPLE
Following the state progression from A359303 (state(n)) is converted to the sequence (a(n)) by:
state(0) = ..1111|0000..
|0000..
a(0) = 0 = \---> bits 000..
state(1) = ..1110|1000..
|1000..
a(1) = 1 = \---> bits 100..
state(2) = ..111101|10000..
|10000..
a(2) = 1 = \---> bits 100..
state(3) = ..111101|01000..
|01000..
a(3) = 2 = \---> bits 01000..
state(4) = ..111011|01000..
a(4) = 2 = \---> bits 01000..
state(5) = ..111010|11000..
a(5) = 3 = \---> bits 11000..
MATHEMATICA
ClearAll[{s, prop, checkprop, doprop, p, a, j, runpos}];
prop[s_]:=(p=Array[0#&, Length[s]];
Do[If[i==1 ||i==Length[s], p[[i]]=0,
{p[[i-1]], p[[i]], p[[i+1]]}+=
Piecewise[{{{1, -1, 0}, {s[[i-1]], s[[i]], s[[i+1]]}=={0, 1, 1}},
{{0, -1, 1}, {s[[i-1]], s[[i]], s[[i+1]]}=={1, 1, 0}}}, {0, 0, 0}]], {i, 1, Length[s]-1} ];
Return[p])
checkprop[s_]:=(p=s;
Do[If[p[[i]]==2, {p[[i-1]], p[[i]], p[[i+1]]}={0, 0, 0}], {i, 2, Length[s]-1}];
Return[p])
doprop[s_]:= Return[s +checkprop[prop[s]]]
(* show only positive states: *)
runpos[n_]:=( s=Join[Array[#/#&, n+5], Array[0#&, n+5]] ; Table[Drop[Nest[doprop[#]&, s, k], n+5], {k, 0, n}])
(* conversion from the automaton states to integers *)
(* a[10] returns {0, 1, 1, 2, 2, 3, 4, 5, 5, 6, 9} *)
a[j_]:=Table[FromDigits[Reverse[runpos[j+1][[k, All]]], 2], {k, 1, j+1}]
PROG
(PARI) See links.
CROSSREFS
Cf. Base sequence A359303. Encoding of complementary left-half in A360142.
Sequence in context: A011884 A029070 A344672 * A354945 A112341 A242774
KEYWORD
nonn,base
AUTHOR
STATUS
approved

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 May 11 19:59 EDT 2024. Contains 372413 sequences. (Running on oeis4.)