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!)
A327981 Distances between successive ones in A051023, the middle column of rule-30 1-D cellular automaton, when started from a lone 1 cell. 6

%I #16 Jun 27 2023 19:42:37

%S 1,2,1,1,3,1,4,2,1,3,3,1,1,2,2,1,1,3,1,1,2,2,2,1,5,1,3,2,2,1,2,2,2,1,

%T 1,1,1,1,5,1,1,1,4,2,2,1,1,6,3,2,1,4,1,1,4,1,2,1,2,1,2,8,4,1,1,1,1,2,

%U 1,1,2,3,1,1,4,1,1,2,2,1,1,6,1,3,4,1,3,1,1,1,3,1,1,1,1,1,7,1,1,1,1,1,1,2,1,3,2,1,2,1,1

%N Distances between successive ones in A051023, the middle column of rule-30 1-D cellular automaton, when started from a lone 1 cell.

%C First differences of A327984, which gives indices of ones in A051023.

%H Antti Karttunen, <a href="/A327981/b327981.txt">Table of n, a(n) for n = 1..100000</a>

%F a(n) = A327984(1+n) - A327984(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)

%e 1: 1(1)1

%e 2: 11(0)01

%e 3: 110(1)111

%e 4: 1100(1)0001

%e 5: 11011(1)10111

%e 6: 110010(0)001001

%e 7: 1101111(0)0111111

%e 8: 11001000(1)11000001

%e 9: 110111101(1)001000111

%e 10: 1100100001(0)1111011001

%e 11: 11011110011(0)10000101111

%e 12: 110010001110(0)110011010001

%e 13: 1101111011001(1)1011100110111

%e The distances between successive 1's in its central column (indicated here with parentheses) are 1-0 (as the first 1 is on row 0, and the second is on row 1), 3-1, 4-3, 5-4, 8-5, 9-8, 13-9, ..., that is, the first terms of this sequence: 1, 2, 1, 1, 3, 1, 4, ...

%t A327981list[upto_]:=Differences[Flatten[Position[CellularAutomaton[30,{{1},0},{upto,{{0}}}],1]]];A327981list[300] (* _Paolo Xausa_, Jun 27 2023 *)

%o (PARI)

%o up_to = 105;

%o A269160(n) = bitxor(n, bitor(2*n, 4*n));

%o A327981list(up_to) = { my(v=vector(up_to), s=1, n=0, on=n, k=0); while(k<up_to, n++; s = A269160(s); if((s>>n)%2, k++; v[k] = (n-on); on=n)); (v); }

%o v327981 = A327981list(up_to);

%o A327981(n) = v327981[n];

%Y Cf. A051023, A110240, A269160, A327980, A327982, A327983, A327984.

%K nonn

%O 1,2

%A _Antti Karttunen_, Oct 03 2019

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 07:46 EDT 2024. Contains 372020 sequences. (Running on oeis4.)