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!)
A360142 Bitwise encoding of the left half, initially fully occupied, state of the 1D cellular automaton from A359303 after n steps. 3
0, 1, 2, 2, 4, 5, 8, 9, 10, 17, 18, 18, 20, 35, 36, 37, 40, 69, 73, 74, 81, 138, 145, 146, 146, 148, 163, 276, 291, 292, 293, 296, 325, 553, 582, 585, 586, 593, 650, 1105, 1162, 1169, 1170, 1172, 1187, 1300, 2211, 2324, 2339, 2340, 2341, 2344, 2373, 2601 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
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 left half here is the part which began as 1's.
The left half state is encoded in an integer by inverting the bits (0<->1) and interpreting the them from right to left 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..
..1111|
..0000|
a(0) = 0 = bits 0
state(1) = ..1110|1000..
..1110|
..0001|
a(1) = 1 = bits 1
state(2) = ..111101|10000..
..111101|
..000010|
a(2) = 2 = bits 10
state(3) = ..111101|10000..
..111101|
..000010|
a(3) = 2 = bits 10
state(4) = ..111011|01000..
..111011|
..000100|
a(4) = 4 = bits 100
state(5) = ..111010|11000..
..111010|
..000101|
a(5) = 5 = bits 101
MATHEMATICA
ClearAll[{s, prop, checkprop, doprop, run, p, a, j, runneg}];
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]]]
runneg[n_]:=( s=Join[Array[#/#&, n+5], Array[0#&, n+5]] ; Table[Drop[Nest[doprop[#]&, s, k], -(n+5)], {k, 0, n}])
a[j_]:=FromDigits[(runneg[j+1]/.{0->1, 1->0})[[j+1, All]], 2]
(* Table[a[n], {n, 0, 10, 1}] *)
(* returns the first 11 elements *)
(* {0, 1, 2, 2, 4, 5, 8, 9, 10, 17, 18} *)
PROG
(PARI) See links.
CROSSREFS
Sequence in context: A308902 A166515 A339560 * A308952 A302401 A326443
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 April 28 02:08 EDT 2024. Contains 372020 sequences. (Running on oeis4.)