%I #19 May 28 2023 11:32:02
%S 0,1,1,0,0,1,0,1,0,1,0,0,1,1,1,0,1,0,1,1,0,1,0,0,1,1,1,1,0,0,1,0,1,0,
%T 0,1,1,1,1,1,1,0,1,0,0,0,1,0,1,0,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0,0,0,1,
%U 0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,0,0,1,0,0,0,0,1,1,0,1,1,1,0,1,0,0,1,0,0,1,0
%N a(n) = A051023(n) XOR A051023(n-1), where A051023 gives the middle column of rule-30 1-D cellular automaton, when started from a lone 1 cell.
%C Taking the first differences of indices of 1's in this sequence gives A327983 from its second term onward.
%H Antti Karttunen, <a href="/A327974/b327974.txt">Table of n, a(n) for n = 1..100000</a>
%H <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F a(n) = A051023(n) XOR A051023(n-1).
%F a(n) = A000035(floor(A327973(n) / A000079(n))).
%e The evolution of one-dimensional cellular automaton rule 30 proceeds as follows, when started from a single alive (1) cell:
%e 0: (1) a(n)
%e 1: 1(1)1 0
%e 2: 11(0)01 1
%e 3: 110(1)111 1
%e 4: 1100(1)0001 0
%e 5: 11011(1)10111 0
%e 6: 110010(0)001001 1
%e 7: 1101111(0)0111111 0
%e 8: 11001000(1)11000001 1
%e 9: 110111101(1)001000111 0
%e 10: 1100100001(0)1111011001 1
%e 11: 11011110011(0)10000101111 0
%e 12: 110010001110(0)110011010001 0
%e 13: 1101111011001(1)1011100110111 1
%e We start from row 1, and write 0 if the central cell is equal to the central cell in the row above, or 1 if it differs, which gives us terms: 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, ...
%t A327974list[nmax_]:=BitXor@@@Partition[CellularAutomaton[30,{{1},0},{nmax,{{0}}}],2,1];A327974list[150] (* _Paolo Xausa_, May 26 2023 *)
%o (PARI)
%o A269160(n) = bitxor(n, bitor(2*n, 4*n)); \\ From A269160.
%o A110240(n) = if(!n,1,A269160(A110240(n-1)));
%o A327973(n) = bitxor(A110240(n), 2*A110240(n-1));
%o A327974(n) = ((A327973(n)>>n)%2);
%o (PARI)
%o up_to = 105;
%o A269160(n) = bitxor(n, bitor(2*n, 4*n));
%o A327974list(up_to) = { my(v=vector(up_to), s=1, oc=s, nc, n=0, k=0); while(k<up_to, n++; s = A269160(s); nc = (s>>n)%2; k++; v[k] = bitxor(oc,nc); oc=nc); (v); }
%o v327974 = A327974list(up_to);
%o A327974(n) = v327974[n];
%Y Cf. A000079, A003986, A003987, A110240, A269160, A327973, A327980, A327981, A327983.
%K nonn
%O 1
%A _Antti Karttunen_, Oct 03 2019
|