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 23 results. Next

A246024 A070952(n)-n.

Original entry on oeis.org

1, 2, 1, 3, 0, 4, -1, 5, -1, 3, 1, 3, 0, 6, -1, 7, -1, 2, 2, 5, 1, 2, 1, 5, 2, 2, 0, 6, 2, 5, 1, 8, -6, 6, -5, 11, -4, 7, 0, 6, 7, 0, 3, 6, -6, 10, -4, 4, -4, 4, -7, 8, 0, 7, -5, 10, 1, 3, -2, 10, 1, 9, -3, 15, 0, -9, -1, 2, 1, -2, 7, 7, 1, -5, 9, 3, 2, 10, 2, 7, 8, -2, -1, 11, -3, 16, -8, 1, 3
Offset: 0

Views

Author

N. J. A. Sloane, Aug 14 2014

Keywords

Crossrefs

A246023 a(n) = A070952(2^n).

Original entry on oeis.org

3, 3, 4, 7, 15, 26, 64, 132, 253, 498, 1033, 2027, 4089, 8141, 16416, 32715, 65722, 131374, 262159, 524211, 1048630, 2097291, 4195039, 8387885
Offset: 0

Views

Author

N. J. A. Sloane, Aug 14 2014

Keywords

Comments

Arises from studying behavior of 1-D CA defined by Rule 30 when started with a single ON cell.
I would very much like to see a recurrence or formula.
Subtracting 2^n gives 2, 1, 0, -1, -1, -6, 0, 4, -3, -14, 9, -21, -7, -51, ...

Crossrefs

Extensions

a(14)-a(23) from Hiroaki Yamanouchi, Sep 12 2014

A151929 First differences of A070952.

Original entry on oeis.org

1, 2, 0, 3, -2, 5, -4, 7, -5, 5, -1, 3, -2, 7, -6, 9, -7, 4, 1, 4, -3, 2, 0, 5, -2, 1, -1, 7, -3, 4, -3, 8, -13, 13, -10, 17, -14, 12, -6, 7, 2, -6, 4, 4, -11, 17, -13, 9, -7, 9, -10, 16, -7, 8, -11, 16, -8, 3, -4, 13, -8, 9, -11, 19, -14, -8, 9, 4, 0, -2, 10, 1, -5, -5, 15, -5, 0, 9, -7, 6, 2, -9, 2, 13, -13, 20, -23, 10, 3, -5, 0, 27, -34, 22
Offset: 0

Views

Author

N. J. A. Sloane, Aug 10 2009

Keywords

Comments

Net increase in number of ON cells at generation n of 1-D CA using Rule 30.

Programs

  • Mathematica
    steps = 100; Join[{1}, Total /@ CellularAutomaton[30, {{1}, 0}, steps] // Differences] (* Jean-François Alcover, Oct 07 2013 *)

A246597 A070952(2^n-1).

Original entry on oeis.org

1, 3, 6, 12, 22, 39, 78, 132, 269, 526, 1036, 2067, 4162, 8252, 16387, 32662, 65372, 130953, 262212, 524550, 1047850, 2097353, 4192505, 8384471
Offset: 0

Views

Author

N. J. A. Sloane, Sep 06 2014

Keywords

Comments

Arises from studying behavior of 1-D CA defined by Rule 30 when started with a single ON cell.
I would very much like to see a recurrence or formula.
Subtracting 2^n gives 0, 1, 2, 4, 6, 7, 14, 4, 13, 14, 12, 19, 66, 60, ...

Crossrefs

Extensions

a(14)-a(23) from Hiroaki Yamanouchi, Sep 12 2014

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

A245549 State of one-dimensional cellular automaton 'sigma' (Rule 30): 000,001,010,011,100,101,110,111 -> 0,0,0,1,1,1,1,0 at generation n, regarded as a binary number.

Original entry on oeis.org

1, 111, 11001, 1101111, 110010001, 11011110111, 1100100001001, 110111100111111, 11001000111000001, 1101111011001000111, 110010000101111011001, 11011110011010000101111
Offset: 0

Views

Author

N. J. A. Sloane, Jul 28 2014

Keywords

Comments

See A110240 for decimal equivalents. See A070952 for number of ON cells.

Crossrefs

Programs

  • Mathematica
    rule=30; rows=20; ca=CellularAutomaton[rule, {{1}, 0}, rows-1, {All, All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]], {rows-k+1, rows+k-1}], {k, 1, rows}]; (* Truncated list of each row *) Table[FromDigits[catri[[k]]], {k, 1, rows}]   (* Binary Representation of Rows *)(* Robert Price, Feb 21 2016 *)

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

Original entry on oeis.org

1, 2, 3, 3, 5, 3, 5, 6, 8, 5, 6, 8, 8, 8, 11, 11, 13, 9, 11, 11, 13, 14, 16, 14, 14, 13, 13, 17, 22, 20, 16, 17, 24, 19, 14, 19, 25, 18, 20, 25, 24, 19, 24, 31, 27, 26, 24, 22, 32, 31, 28, 24, 29, 34, 30, 31, 37, 34, 34, 36, 35, 34, 35, 36, 43, 40, 36, 38, 37, 39, 40
Offset: 0

Views

Author

Hans Havermann, May 26 2002

Keywords

Comments

Number of 1's in n-th row of triangle in A070887.
Although the initial behavior is chaotic, it is an astonishing fact, pointed out by Wolfram [2002, p. 39], that after about three thousand terms all the irregularities disappear. - N. J. A. Sloane, May 15 2015

References

  • Matthew Cook, A Concrete View of Rule 110 Computation, in "The Complexity of Simple Programs", T. Neary, D. Woods, A. K. Seda, and N. Murphy (Eds.), 2008, pp. 31-55.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; Chapter 3.

Crossrefs

Programs

Formula

For n >= 2854, a(n+469) = -a(n+453) + a(n+256) + a(n+240) + a(n+229) + a(n+213) - a(n+16) - a(n). - N. J. A. Sloane, May 15 2015

Extensions

Added references and links. - N. J. A. Sloane, Aug 09 2014
Changed offset to make consistent with A070952, etc. - N. J. A. Sloane, Aug 15 2014

A328106 Binary weight of A327971: a(n) = A000120(A110240(n) XOR A030101(A110240(n))).

Original entry on oeis.org

0, 0, 2, 2, 2, 4, 6, 4, 8, 10, 10, 8, 12, 8, 18, 6, 12, 26, 16, 18, 14, 18, 20, 22, 22, 26, 26, 38, 30, 26, 36, 26, 28, 36, 28, 18, 28, 42, 36, 32, 34, 40, 44, 38, 40, 50, 48, 48, 50, 58, 46, 56, 48, 42, 54, 48, 56, 56, 46, 54, 48, 52, 60, 58, 78, 74, 64, 60, 66, 74, 74, 64, 80, 74, 80, 62, 92, 62, 80, 70, 68, 100, 90, 82, 80, 92
Offset: 0

Views

Author

Antti Karttunen, Oct 05 2019

Keywords

Comments

a(n) is the number of times the k-th cell from the left is different from the k-th cell from the right, at the generation n of Rule 30 1-D cellular automaton, when it is started from a single alive cell.
All terms are even.

Examples

			The evolution of one-dimensional cellular automaton rule 30 proceeds as follows, when started from a single alive (1) cell:
---------------------------------------------- a(n)
   0:              (1)                          0
   1:             1(1)1                         0
   2:            11(0)01                        2
   3:           110(1)111                       2
   4:          1100(1)0001                      2
   5:         11011(1)10111                     4
   6:        110010(0)001001                    6
   7:       1101111(0)0111111                   4
   8:      11001000(1)11000001                  8
   9:     110111101(1)001000111                10
  10:    1100100001(0)1111011001               10
  11:   11011110011(0)10000101111               8
  12:  110010001110(0)110011010001             12
  13: 1101111011001(1)1011100110111             8
When we count the times the k-th cell from the left is different from the k-th cell from the right, we obtain a(n). Note that the central cells (indicated with parentheses) do not affect the count, as the central cell is always equal to itself.
		

Crossrefs

Programs

Formula

a(n) = Sum_{i=0..2n} abs(A070950(n,i)-A070950(n,n-i)).

A070951 Number of 0's in n-th row of triangle in A070950.

Original entry on oeis.org

0, 0, 2, 1, 5, 2, 8, 3, 10, 7, 10, 9, 13, 8, 16, 9, 18, 16, 17, 15, 20, 20, 22, 19, 23, 24, 27, 22, 27, 25, 30, 24, 39, 28, 40, 25, 41, 31, 39, 34, 34, 42, 40, 38, 51, 36, 51, 44, 53, 46, 58, 44, 53, 47, 60, 46, 56, 55, 61, 50, 60, 53, 66, 49, 65, 75, 68, 66, 68, 72
Offset: 0

Views

Author

N. J. A. Sloane, May 19 2002

Keywords

Comments

a(n) + A070952(n) = 2*n + 1. - Reinhard Zumkeller, Jun 07 2013

Crossrefs

Programs

  • Haskell
    a070951 = length . filter (== 0) . a070950_row
    -- Reinhard Zumkeller, Jun 06 2013
  • Mathematica
    steps = 100; Count[#, 0]& /@ MapIndexed[ Take[#1, {steps - First[#2] + 2, steps + First[#2]}]&, CellularAutomaton[30, {{1}, 0}, steps]] (* Jean-François Alcover, Oct 07 2013 *)

Extensions

More terms from Hans Havermann, May 26 2002
Showing 1-10 of 23 results. Next