cp's OEIS Frontend

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.

Showing 1-10 of 12 results. Next

A110240 Decimal form of binary integer produced by the ON cells at n-th generation following Wolfram's Rule 30 cellular automaton starting from a single ON-cell represented as 1.

Original entry on oeis.org

1, 7, 25, 111, 401, 1783, 6409, 28479, 102849, 456263, 1641433, 7287855, 26332369, 116815671, 420186569, 1865727615, 6741246849, 29904391303, 107568396185, 477630335215, 1725755276049, 7655529137527, 27537575631497
Offset: 0

Views

Author

Keywords

Comments

See A245549 for binary equivalents. See A070952 for number of ON cells. - N. J. A. Sloane, Jul 28 2014
For n > 0: 3 < a(n+1) / a(n) < 5, floor(a(n+1)/a(n)) = A010702(n+1). - Reinhard Zumkeller, Jun 08 2013
Iterates of A269160 starting from a(0) = 1. See also A269168. - Antti Karttunen, Feb 20 2016
Also, the decimal representation of the n-th generation of the "Rule 66847740" 5-neighbors elementary cellular automaton starting with a single ON (black) cell. - Philipp O. Tsvetkov, Jul 17 2019

Examples

			a(1)=1 because the automaton begins at first "generation" with one black cell: 1;
a(2)=5 because one black cell, through Rule 30 at 2nd generation, produces three contiguous black cells: 111 (binary), so 7 (decimal);
a(3)=25 because the third generation is "black black white white black" cells: 11001, so 25 (decimal).
		

Crossrefs

Cf. A030101, A070950, A051023, A092539, A092540, A070952 (number of ON cells, the binary weight of terms), A100053, A100054, A100055, A094603, A094604, A000225, A074890, A010702, A245549, A269160, A269162.
Cf. A269165 (indices of ones in this sequence).
Cf. A269166 (a left inverse).
Left edge of A269168.
Cf. also A265281, A328106.
For bitwise XOR (and OR) combinations with other such 1D CA trajectories, see for example: A327971, A327972, A327973, A327976, A328103, A328104.

Programs

  • Haskell
    a110240 = foldl (\v d -> 2 * v + d) 0 . map toInteger . a070950_row
    -- Reinhard Zumkeller, Jun 08 2013
    
  • Mathematica
    rows = 23; ca = CellularAutomaton[30, {{1}, 0}, rows-1]; Table[ FromDigits[ ca[[k, rows-k+1 ;; rows+k-1]], 2], {k, 1, rows}] (* Jean-François Alcover, Jun 07 2012 *)
  • PARI
    A269160(n) = bitxor(n, bitor(2*n, 4*n));
    A110240(n) = if(!n,1,A269160(A110240(n-1))); \\ Antti Karttunen, Oct 05 2019
    
  • Python
    def A269160(n): return(n^((n<<1)|(n<<2)))
    def genA110240():
        '''Yield successive terms of A110240 (Rule 30) starting from A110240(0)=1.'''
        s = 1
        while True:
           yield s
           s = A269160(s)
    def take(n, g):
        '''Returns a list composed of the next n elements returned by generator g.'''
        z = []
        if 0 == n: return(z)
        for x in g:
            z.append(x)
            if n > 1: n = n-1
            else: return(z)
    take(30, genA110240())
    # Antti Karttunen, Oct 05 2019
  • Scheme
    ;; With memoization-macro definec.
    (definec (A110240 n) (if (zero? n) 1 (A269160 (A110240 (- n 1)))))
    ;; Antti Karttunen, Feb 20 2016
    

Formula

From Antti Karttunen, Feb 20 2016: (Start)
a(0) = 1, for n >= 1, a(n) = A269160(a(n-1)).
a(n) = A030101(A265281(n)). [The rule 30 is the mirror image of the rule 86.]
A269166(a(n)) = n for all n >= 0. (End)
From Antti Karttunen, Oct 05 2019: (Start)
For n >= 1, a(n) = a(n-1) XOR 2*A328104(n-1).
For n >= 1, a(n) = 2*a(n-1) XOR A327973(n). (End)

Extensions

More terms from Eric W. Weisstein, Apr 08 2006
Offset corrected by Reinhard Zumkeller, Jun 08 2013

A070950 Triangle read by rows giving successive states of cellular automaton generated by "Rule 30".

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 19 2002

Keywords

Comments

If cell and right-hand neighbor are both 0 then new state of cell = state of left-hand neighbor; otherwise new state is complement of that of left-hand neighbor.
A simple rule which produces apparently random behavior. "... probably the single most surprising discovery I have ever made" - Stephen Wolfram.
Row n has length 2n+1.
A110240(n) = A245549(n) = value of row n, seen as binary number. - Reinhard Zumkeller, Jun 08 2013
A070952 gives number of ON cells. - N. J. A. Sloane, Jul 28 2014

Examples

			Triangle begins:
        1;
      1,1,1;
    1,1,0,0,1;
  1,1,0,1,1,1,1;
  ...
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 27.

Crossrefs

Cf. A070951, A070952 (row sums), A051023 (central terms).
Cf. A071032 (mirror image, rule 86), A226463 (complemented, rule 135), A226464 (mirrored and complemented, rule 149).
Cf. A363343 (diagonals from the right), A363344 (diagonals from the left).
Cf. A094605 (periods of diagonals from the right), A363345 (eventual periods of diagonals from the left), A363346 (length of initial transients on diagonals from the left).
Cf. also A245549, A110240.

Programs

  • Haskell
    a070950 n k = a070950_tabf !! n !! k
    a070950_row n = a070950_tabf !! n
    a070950_tabf = iterate rule30 [1] where
       rule30 row = f ([0,0] ++ row ++ [0,0]) where
           f [,]          = []
           f (u:ws@(0:0:_)) = u : f ws
           f (u:ws)         = (1 - u) : f ws
    -- Reinhard Zumkeller, Feb 01 2013
  • Mathematica
    ArrayPlot[CellularAutomaton[30,{{1},0}, 50]] (* N. J. A. Sloane, Aug 11 2009 *)
    Clear[t, n, k]; nn = 10; t[1, k_] := t[1, k] = If[k == 3, 1, 0];
    t[n_, k_] := t[n, k] = Mod[t[-1 + n, -2 + k] + t[-1 + n, -1 + k] + (1 + t[-1 + n, -1 + k]) t[-1 + n, k], 2]; Flatten[Table[Table[t[n, k], {k, 3, 2*n + 1}], {n, 1, nn}]] (*Mats Granvik,Dec 08 2019*)

Formula

From Mats Granvik, Dec 06 2019: (Start)
The following recurrence expresses the rules in rule 30, except that instead of If, Or, And, Not, we use addition, subtraction, and multiplication.
T(n, 1) = 0
T(n, 2) = 0
T(1, 3) = 1
T(n, k) = [2*n + 1 >= k] ((1 - (T(n - 1, k - 2)*T(n - 1, k - 1)*T(n - 1, k)))*(1 - T(n - 1, k - 2)*T(n - 1, k - 1)*(1 - T(n - 1, k)))*(1 - (T(n - 1, k - 2)*(1 - T(n - 1, k - 1))*T(n - 1, k)))*(1 - ((1 - T(n - 1, k - 2))*(1 - T(n - 1, k - 1))*(1 - T(n - 1, k))))) + ((T(n - 1, k - 2)*(1 - T(n - 1, k - 1))*(1 - T(n - 1, k)))*((1 - T(n - 1, k - 2))*T(n - 1, k - 1)*T(n - 1, k))*((1 - T(n - 1, k - 2))*T(n - 1, k - 1)*(1 - T(n - 1, k)))*((1 - T(n - 1, k - 2))*(1 - T(n - 1, k - 1))*T(n - 1, k))).
Discarding the term after the plus sign, multiplying/expanding the terms out and replacing all exponents with ones, gives us this simplified recurrence:
T(n, 1) = 0
T(n, 2) = 0
T(1, 3) = 1
T(n, k) = T(-1 + n, -2 + k) + T(-1 + n, -1 + k) - 2 T(-1 + n, -2 + k) T(-1 + n, -1 + k) + (-1 + 2 T(-1 + n, -2 + k)) (-1 + T(-1 + n, -1 + k)) T(-1 + n, k).
That in turn simplifies to:
T(n, 1) = 0
T(n, 2) = 0
T(1, 3) = 1
T(n, k) = Mod(T(-1 + n, -2 + k) + T(-1 + n, -1 + k) + (1 + T(-1 + n, -1 + k)) T(-1 + n, k), 2).
(End)

Extensions

More terms from Hans Havermann, May 24 2002

A070952 Number of 1's in n-th generation of 1-D CA using Rule 30, started with a single 1.

Original entry on oeis.org

1, 3, 3, 6, 4, 9, 5, 12, 7, 12, 11, 14, 12, 19, 13, 22, 15, 19, 20, 24, 21, 23, 23, 28, 26, 27, 26, 33, 30, 34, 31, 39, 26, 39, 29, 46, 32, 44, 38, 45, 47, 41, 45, 49, 38, 55, 42, 51, 44, 53, 43, 59, 52, 60, 49, 65, 57, 60, 56, 69, 61, 70, 59, 78, 64, 56, 65, 69, 69
Offset: 0

Views

Author

N. J. A. Sloane, May 19 2002, Aug 10 2009

Keywords

Comments

Number of 1's in n-th row of triangle in A070950.
Row sums in A070950; a(n) = 2*n + 1 - A070951(n). - Reinhard Zumkeller, Jun 07 2013

Examples

			May be arranged into blocks of length 1,1,2,4,8,16,...:
1,
3,
3, 6,
4, 9, 5, 12,
7, 12, 11, 14, 12, 19, 13, 22,
15, 19, 20, 24, 21, 23, 23, 28, 26, 27, 26, 33, 30, 34, 31, 39,
26, 39, 29, 46, 32, 44, 38, 45, 47, 41, 45, 49, 38, 55, 42, 51,
    44, 53, 43, 59, 52, 60, 49, 65, 57, 60, 56, 69, 61, 70, 59, 78,
64, 56, 65, 69, 69, ...
		

Crossrefs

This sequence, A110240, and A245549 all describe the same sequence of successive states. See also A269160.
Cf. A110267 (partial sums), A246023, A246024, A246025, A246026, A246597.
A265703 is an essentially identical sequence.

Programs

  • Haskell
    a070952 = sum . a070950_row  -- Reinhard Zumkeller, Jun 07 2013
  • Mathematica
    Map[Function[Apply[Plus,Flatten[ #1]]], CellularAutomaton[30,{{1},0},100]] (* N. J. A. Sloane, Aug 10 2009 *)
    SequenceCount[s, {1,0}] + 2 SequenceCount[s, {0,0,1}] (* gives a(n) where s is the sequence for row n-1 *) (* Trevor Cappallo, May 01 2021 *)

Extensions

More terms from Hans Havermann, May 26 2002
Corrected offset and initial term - N. J. A. Sloane, Jun 07 2013

A265122 Binary representation of the n-th iteration of the "Rule 73" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 0, 10101, 0, 101111101, 10001000, 1010001000101, 1000100000, 10111000100011101, 1010100010101000, 101000000010000000101, 111110001111100000, 1011101000101010001011101, 101000100000001000101000, 10100000100011111000100000101, 11100010100010100011100000
Offset: 0

Views

Author

Robert Price, Dec 01 2015

Keywords

Examples

			From _Michael De Vlieger_, Dec 02 2015: (Start)
First 8 rows, showing surrounding context at left, cells generated by the initial cell at center, and the binary equivalent at right where leading zeros are lost:
0                   1                 ->                 1
1                 0 0 0               ->                 0
0               1 0 1 0 1             ->             10101
1             0 0 0 0 0 0 0           ->                 0
0           1 0 1 1 1 1 1 0 1         ->         101111101
1         0 0 0 1 0 0 0 1 0 0 0       ->          10001000
0       1 0 1 0 0 0 1 0 0 0 1 0 1     ->     1010001000101
1     0 0 0 0 0 1 0 0 0 1 0 0 0 0 0   ->        1000100000
0   1 0 1 1 1 0 0 0 1 0 0 0 1 1 1 0 1 -> 10111000100011101
(End)
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A245549.

Programs

  • Mathematica
    rule = 73; rows = 20; Table[FromDigits[Table[Take[CellularAutomaton[rule,{{1},0}, rows-1, {All,All}][[k]], {rows-k+1, rows+k-1}], {k,1,rows}][[k]]], {k,1,rows}]

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

Original entry on oeis.org

4, 1, 3, 1, 1, 2, 3, 1, 2, 1, 4, 2, 4, 1, 4, 2, 2, 3, 1, 1, 1, 3, 1, 2, 2, 3, 2, 2, 7, 1, 1, 1, 5, 1, 1, 2, 2, 4, 1, 1, 1, 1, 2, 1, 2, 3, 1, 1, 4, 1, 1, 3, 3, 3, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 6, 4, 2, 1, 4, 1, 1, 4, 2, 4, 1, 1, 1, 1, 3, 1, 2, 1, 1, 3, 1, 5, 1, 7, 1, 1, 1, 1, 1, 8, 3, 1, 2, 3, 4, 1, 1, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Oct 03 2019

Keywords

Comments

First differences of A327985, which gives indices of zeros in A051023.

Examples

			The evolution of one-dimensional cellular automaton rule 30 proceeds as follows, when started from a single alive (1) cell:
   0:              (1)
   1:             1(1)1
   2:            11(0)01
   3:           110(1)111
   4:          1100(1)0001
   5:         11011(1)10111
   6:        110010(0)001001
   7:       1101111(0)0111111
   8:      11001000(1)11000001
   9:     110111101(1)001000111
  10:    1100100001(0)1111011001
  11:   11011110011(0)10000101111
  12:  110010001110(0)110011010001
When noting up the distances between successive 0's in its central column (indicated here with parentheses), we obtain 6-2 (as the first 0 is on row 2, and the second is on row 6), 7-6, 10-7, 11-10, 12-11, ..., that is, the first terms of this sequence: 4, 1, 3, 1, 1, ...
		

Crossrefs

Programs

  • Mathematica
    A327980list[upto_]:=Differences[Flatten[Position[CellularAutomaton[30,{{1},0},{upto,{{0}}}],0]]];A327980list[300] (* Paolo Xausa, Jun 01 2023 *)
  • PARI
    up_to = 105;
    A269160(n) = bitxor(n, bitor(2*n, 4*n));
    A327980list(up_to) = { my(v=vector(up_to), s=25, n=2, on=n, k=0); while(kA269160(s); if(!((s>>n)%2), k++; v[k] = (n-on); on=n)); (v); }
    v327980 = A327980list(up_to);
    A327980(n) = v327980[n];

Formula

a(n) = A327985(1+n) - A327985(n).

A265156 Decimal representation of the n-th iteration of the "Rule 73" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 0, 21, 0, 381, 136, 5189, 544, 94493, 43176, 1311749, 254944, 24400989, 10617384, 336720133, 59386080, 6262162781, 2688081960, 86425034501, 15602819808, 1602324730205, 689510189096, 22111597905669, 4029655427808, 410123492458845, 176987155003432, 5661487452198661, 1029729726008032, 104994856690270557, 45284638610044968
Offset: 0

Views

Author

Robert Price, Dec 02 2015

Keywords

Examples

			From _Michael De Vlieger_, Dec 04 2015: (Start)
First 12 rows, showing surrounding context at left, cells generated by the initial cell at center, and the decimal equivalent at right where leading zeros are lost:
0                           1                         ->         1
1                         0 0 0                       ->         0
0                       1 0 1 0 1                     ->        21
1                     0 0 0 0 0 0 0                   ->         0
0                   1 0 1 1 1 1 1 0 1                 ->       381
1                 0 0 0 1 0 0 0 1 0 0 0               ->       136
0               1 0 1 0 0 0 1 0 0 0 1 0 1             ->      5189
1             0 0 0 0 0 1 0 0 0 1 0 0 0 0 0           ->       544
0           1 0 1 1 1 0 0 0 1 0 0 0 1 1 1 0 1         ->     94493
1         0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0       ->     43176
0       1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1     ->   1311749
1     0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 0   ->    254944
0   1 0 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 1 1 0 1 ->  24400989
(End)
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Programs

  • Mathematica
    rule = 73; rows = 30; Table[FromDigits[Table[Take[CellularAutomaton[rule,{{1},0}, rows-1, {All,All}][[k]], {rows-k+1, rows+k-1}], {k,1,rows}][[k]],2], {k,1,rows}]

A265205 Number of ON (black) cells in the n-th iteration of the "Rule 73" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 0, 3, 0, 7, 2, 5, 2, 9, 6, 5, 10, 13, 6, 11, 10, 15, 10, 19, 10, 23, 10, 17, 20, 19, 16, 25, 18, 19, 20, 25, 14, 37, 20, 27, 26, 35, 20, 37, 30, 41, 24, 33, 36, 39, 26, 45, 36, 37, 38, 41, 36, 49, 44, 29, 56, 39, 40, 57, 40, 43, 60, 39, 48, 55, 44, 45, 64
Offset: 0

Views

Author

Robert Price, Dec 04 2015

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Programs

  • Mathematica
    rule = 73; rows = 30; Table[Total[Table[Take[CellularAutomaton[rule, {{1},0},rows-1,{All,All}][[k]], {rows-k+1, rows+k-1}], {k,1,rows}][[k]]], {k,1,rows}]

A265206 Total number of ON (black) cells after n iterations of the "Rule 73" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 1, 4, 4, 11, 13, 18, 20, 29, 35, 40, 50, 63, 69, 80, 90, 105, 115, 134, 144, 167, 177, 194, 214, 233, 249, 274, 292, 311, 331, 356, 370, 407, 427, 454, 480, 515, 535, 572, 602, 643, 667, 700, 736, 775, 801, 846, 882, 919, 957, 998, 1034, 1083, 1127, 1156
Offset: 0

Views

Author

Robert Price, Dec 04 2015

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Programs

  • Mathematica
    rule = 73; rows = 30; Table[Total[Take[Table[Total[Table[Take[CellularAutomaton[rule,{{1},0},rows-1,{All,All}][[k]],{rows-k+1,rows+k-1}],{k,1,rows}][[k]]],{k,1,rows}],k]],{k,1,rows}]

A265219 Number of OFF (white) cells in the n-th iteration of the "Rule 73" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

0, 3, 2, 7, 2, 9, 8, 13, 8, 13, 16, 13, 12, 21, 18, 21, 18, 25, 18, 29, 18, 33, 28, 27, 30, 35, 28, 37, 38, 39, 36, 49, 28, 47, 42, 45, 38, 55, 40, 49, 40, 59, 52, 51, 50, 65, 48, 59, 60, 61, 60, 67, 56, 63, 80, 55, 74, 75, 60, 79, 78, 63, 86, 79, 74, 87, 88
Offset: 0

Views

Author

Robert Price, Dec 05 2015

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

A261299 Binary representation of the middle column of the "Rule 30" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 11, 110, 1101, 11011, 110111, 1101110, 11011100, 110111001, 1101110011, 11011100110, 110111001100, 1101110011000, 11011100110001, 110111001100010, 1101110011000101, 11011100110001011, 110111001100010110, 1101110011000101100, 11011100110001011001
Offset: 0

Views

Author

Robert Price, Dec 05 2015

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Programs

  • Mathematica
    A261299list[nmax_]:=With[{ca=CellularAutomaton[30,{{1},0},{nmax,{{0}}}]},Array[FromDigits[Take[ca,#]]&,nmax+1]];A261299list[25] (* Paolo Xausa, May 30 2023 *)
Showing 1-10 of 12 results. Next